uClibc: update to 0.9.33.2, fixes #4420
[openwrt/svn-archive/archive.git] / toolchain / uClibc / patches-0.9.33.2 / 601-ubicom32_uClibc_fixes.patch
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);
6
7 +#ifndef DL_LOADADDR_ISSET(_loadaddr)
8 +#define DL_LOADADDR_ISSET(_loadaddr) ((_loadaddr) != 0)
9 +#endif
10 +
11 /*
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__
18 - if (load_off != 0)
19 + if (DL_LOADADDR_ISSET(load_off))
20 #endif
21 {
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 { \
26 } while (0)
27
28 #define DL_LOADADDR_TYPE struct elf32_fdpic_loadaddr
29 +#define DL_LOADADDR_ISSET(_loadaddr) ((_loadaddr).map != NULL)
30
31 #define DL_RELOC_ADDR(LOADADDR, ADDR) \
32 ((ElfW(Addr))__reloc_pointer ((void*)(ADDR), (LOADADDR).map))