summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-02-21 20:25:29 -0500
committerMike Frysinger <vapier@gentoo.org>2011-02-21 20:27:29 -0500
commit3ac213101204750950a129e1a245c4730525287f (patch)
tree27f7c8bbed1feccbd4df075a86b9c553b4c37a7c /ldso
parent128e290b1e4204ac33b4cad7fc6189447f029311 (diff)
ldso: fix fdpic builds
Commit 33cb7f0b4 tried to add a small optimization for skipping unnecessary .dynamic adjustments, but did so by referencing an opaque type. While this works for non-fdpic targets (since the type can be cast to an integer), it falls apart for fdpic targets where the type is actually a structure. Since FDPIC can't support this optimization without walking a series of linked structures, just skip it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'ldso')
-rw-r--r--ldso/include/dl-elf.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/ldso/include/dl-elf.h b/ldso/include/dl-elf.h
index cbb2100b1..5aec64f0d 100644
--- a/ldso/include/dl-elf.h
+++ b/ldso/include/dl-elf.h
@@ -162,8 +162,13 @@ unsigned int __dl_parse_dynamic_info(ElfW(Dyn) *dpnt, unsigned long dynamic_info
if (dynamic_info[tag]) \
dynamic_info[tag] = (unsigned long) DL_RELOC_ADDR(load_off, dynamic_info[tag]); \
} while (0)
- /* Don't adjust .dynamic unnecessarily. */
- if (load_off != 0) {
+ /* Don't adjust .dynamic unnecessarily. For FDPIC targets,
+ we'd have to walk all the loadsegs to find out if it was
+ actually unnecessary, so skip this optimization. */
+#ifndef __FDPIC__
+ if (load_off != 0)
+#endif
+ {
ADJUST_DYN_INFO(DT_HASH, load_off);
ADJUST_DYN_INFO(DT_PLTGOT, load_off);
ADJUST_DYN_INFO(DT_STRTAB, load_off);