1 --- a/ldso/include/dl-elf.h
2 +++ b/ldso/include/dl-elf.h
4 extern int _dl_fixup(struct dyn_elf *rpnt, int flag);
5 extern void _dl_protect_relro (struct elf_resolve *l);
7 +#ifndef DL_LOADADDR_ISSET(_loadaddr)
8 +#define DL_LOADADDR_ISSET(_loadaddr) ((_loadaddr) != 0)
12 * Bitsize related settings for things ElfW()
13 * does not handle already
15 dynamic_info[tag] = (unsigned long) DL_RELOC_ADDR(load_off, dynamic_info[tag]); \
17 /* Don't adjust .dynamic unnecessarily. */
18 - if (load_off != 0) {
19 + if (DL_LOADADDR_ISSET(load_off)) {
20 ADJUST_DYN_INFO(DT_HASH, load_off);
21 ADJUST_DYN_INFO(DT_PLTGOT, load_off);
22 ADJUST_DYN_INFO(DT_STRTAB, load_off);
23 --- a/ldso/ldso/ubicom32/dl-sysdep.h
24 +++ b/ldso/ldso/ubicom32/dl-sysdep.h
28 #define DL_LOADADDR_TYPE struct elf32_fdpic_loadaddr
29 +#define DL_LOADADDR_ISSET(_loadaddr) ((_loadaddr).map != NULL)
31 #define DL_RELOC_ADDR(LOADADDR, ADDR) \
32 ((ElfW(Addr))__reloc_pointer ((void*)(ADDR), (LOADADDR).map))