aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-11-22 17:50:08 +0000
committerFelix Fietkau <nbd@openwrt.org>2010-11-22 17:50:08 +0000
commitca622f9bd0ca53136dd680e6749488978b4bf642 (patch)
tree33844e1ba89e1523328eecdb43056a28a2930f04 /toolchain
parentbccdd525198d3a0ba48645cc8bc61caef9cb9302 (diff)
downloadupstream-ca622f9bd0ca53136dd680e6749488978b4bf642.tar.gz
upstream-ca622f9bd0ca53136dd680e6749488978b4bf642.tar.bz2
upstream-ca622f9bd0ca53136dd680e6749488978b4bf642.zip
uClibc: fix ubicom32 compile error with 0.9.32
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24101 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/uClibc/patches-0.9.32/601-ubicom32_uClibc_fixes.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/toolchain/uClibc/patches-0.9.32/601-ubicom32_uClibc_fixes.patch b/toolchain/uClibc/patches-0.9.32/601-ubicom32_uClibc_fixes.patch
new file mode 100644
index 0000000000..0333046c27
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.32/601-ubicom32_uClibc_fixes.patch
@@ -0,0 +1,32 @@
+--- a/ldso/include/dl-elf.h
++++ b/ldso/include/dl-elf.h
+@@ -42,6 +42,10 @@
+ extern int _dl_fixup(struct dyn_elf *rpnt, int flag);
+ extern void _dl_protect_relro (struct elf_resolve *l);
+
++#ifndef DL_LOADADDR_ISSET(_loadaddr)
++#define DL_LOADADDR_ISSET(_loadaddr) ((_loadaddr) != 0)
++#endif
++
+ /*
+ * Bitsize related settings for things ElfW()
+ * does not handle already
+@@ -163,7 +167,7 @@
+ dynamic_info[tag] = (unsigned long) DL_RELOC_ADDR(load_off, dynamic_info[tag]); \
+ } while (0)
+ /* Don't adjust .dynamic unnecessarily. */
+- if (load_off != 0) {
++ if (DL_LOADADDR_ISSET(load_off)) {
+ ADJUST_DYN_INFO(DT_HASH, load_off);
+ ADJUST_DYN_INFO(DT_PLTGOT, load_off);
+ ADJUST_DYN_INFO(DT_STRTAB, load_off);
+--- a/ldso/ldso/ubicom32/dl-sysdep.h
++++ b/ldso/ldso/ubicom32/dl-sysdep.h
+@@ -101,6 +101,7 @@
+ } while (0)
+
+ #define DL_LOADADDR_TYPE struct elf32_fdpic_loadaddr
++#define DL_LOADADDR_ISSET(_loadaddr) ((_loadaddr).map != NULL)
+
+ #define DL_RELOC_ADDR(LOADADDR, ADDR) \
+ ((ElfW(Addr))__reloc_pointer ((void*)(ADDR), (LOADADDR).map))