comparison dynload/dynload_unix.c @ 388:c7c180c73dc9

- haiku dynload fix
author Tassilo Philipp
date Thu, 21 Jan 2021 19:50:31 +0100
parents ad5f9803f52f
children e221473a8217
comparison
equal deleted inserted replaced
387:11483966a3ee 388:c7c180c73dc9
160 160
161 161
162 /* - OpenBSD >= 3.7 has dl_iterate_phdr(), as well as glibc >= 2.2.4 162 /* - OpenBSD >= 3.7 has dl_iterate_phdr(), as well as glibc >= 2.2.4
163 - also some libc impls (like musl) provide dlinfo(), but not RTLD_SELF (see above), however they might come 163 - also some libc impls (like musl) provide dlinfo(), but not RTLD_SELF (see above), however they might come
164 with dl_iterate_phdr (which comes from ELF program header iteration), so base it on that 164 with dl_iterate_phdr (which comes from ELF program header iteration), so base it on that
165 - skip and use dladdr()-based guessing (see below) if explicitly requested, e.g. by ./configure */ 165 - skip and use dladdr()-based guessing (see below) if explicitly requested, e.g. by ./configure
166 #elif !defined(DL_DLADDR_TO_LIBPATH) && (defined(OS_OpenBSD) || defined(DL_USE_GLIBC_ITER_PHDR) || (!defined(RTLD_SELF) && defined(__ELF__))) 166 - Haiku/BeOS does have the headers but no implementation of dl_iterate_phdr() (at least as of 2021) */
167 #elif !defined(DL_DLADDR_TO_LIBPATH) && (defined(OS_OpenBSD) || defined(DL_USE_GLIBC_ITER_PHDR) || (!defined(RTLD_SELF) && defined(__ELF__))) && !defined(OS_BeOS)
167 168
168 #include <sys/types.h> 169 #include <sys/types.h>
169 #include <link.h> 170 #include <link.h>
170 171
171 typedef struct { 172 typedef struct {