2010-11-22 19:50:08 +02:00
|
|
|
--- a/ldso/include/dl-elf.h
|
|
|
|
+++ b/ldso/include/dl-elf.h
|
2011-02-24 14:56:20 +02:00
|
|
|
@@ -42,6 +42,10 @@ extern int _dl_linux_resolve(void);
|
2010-11-22 19:50:08 +02:00
|
|
|
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
|
2011-02-24 14:56:20 +02:00
|
|
|
@@ -166,7 +170,7 @@ unsigned int __dl_parse_dynamic_info(Elf
|
|
|
|
we'd have to walk all the loadsegs to find out if it was
|
|
|
|
actually unnecessary, so skip this optimization. */
|
2011-04-17 20:38:35 +03:00
|
|
|
#if !defined __FDPIC__ && !defined __DSBT__
|
2011-02-24 14:56:20 +02:00
|
|
|
- if (load_off != 0)
|
|
|
|
+ if (DL_LOADADDR_ISSET(load_off))
|
|
|
|
#endif
|
|
|
|
{
|
2010-11-22 19:50:08 +02:00
|
|
|
ADJUST_DYN_INFO(DT_HASH, load_off);
|
|
|
|
--- a/ldso/ldso/ubicom32/dl-sysdep.h
|
|
|
|
+++ b/ldso/ldso/ubicom32/dl-sysdep.h
|
2011-02-24 14:56:20 +02:00
|
|
|
@@ -101,6 +101,7 @@ do { \
|
2010-11-22 19:50:08 +02:00
|
|
|
} 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))
|