diff options
Diffstat (limited to 'libexec/rtld-elf/rtld.c')
-rw-r--r-- | libexec/rtld-elf/rtld.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index cd8385d..62ca650 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -162,6 +162,9 @@ static Elf_Sym sym_zero; /* For resolving undefined weak refs. */ extern Elf_Dyn _DYNAMIC; #pragma weak _DYNAMIC +#ifndef RTLD_IS_DYNAMIC +#define RTLD_IS_DYNAMIC() (&_DYNAMIC != NULL) +#endif /* * These are the functions the dynamic linker exports to application @@ -1008,7 +1011,7 @@ init_rtld(caddr_t mapbase) #ifdef PIC objtmp.relocbase = mapbase; #endif - if (&_DYNAMIC != 0) { + if (RTLD_IS_DYNAMIC()) { objtmp.dynamic = rtld_dynamic(&objtmp); digest_dynamic(&objtmp, 1); assert(objtmp.needed == NULL); |