1 --- a/ldso/include/dl-elf.h
2 +++ b/ldso/include/dl-elf.h
3 @@ -45,6 +45,10 @@ extern int _dl_linux_resolve(void);
4 extern int _dl_fixup(struct dyn_elf *rpnt, struct r_scope_elem *scope, 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
14 @@ -206,7 +210,7 @@ unsigned int __dl_parse_dynamic_info(Elf
15 we'd have to walk all the loadsegs to find out if it was
16 actually unnecessary, so skip this optimization. */
17 #if !defined __FDPIC__ && !defined __DSBT__
19 + if (DL_LOADADDR_ISSET(load_off))
22 ADJUST_DYN_INFO(DT_HASH, load_off);
23 --- a/ldso/ldso/ubicom32/dl-sysdep.h
24 +++ b/ldso/ldso/ubicom32/dl-sysdep.h
25 @@ -101,6 +101,7 @@ do { \
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))