aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@acm.org>2007-04-12 15:52:02 +0000
committerBob Wilson <bob.wilson@acm.org>2007-04-12 15:52:02 +0000
commite1e5c0b5eb58ca69f19feca1b13bedc9fc256e84 (patch)
treef1849969021349cf3d9389153c3678b21158e6a4 /bfd
parente6590a1b7e15e9f2f2527603f2e18bd3d4da62a6 (diff)
downloadgdb-e1e5c0b5eb58ca69f19feca1b13bedc9fc256e84.zip
gdb-e1e5c0b5eb58ca69f19feca1b13bedc9fc256e84.tar.gz
gdb-e1e5c0b5eb58ca69f19feca1b13bedc9fc256e84.tar.bz2
bfd/
* elf32-xtensa.c (elf_xtensa_gc_mark_hook): Don't follow references from Xtensa property sections. ld/ * emulparams/elf32xtensa.sh (OTHER_SECTIONS): KEEP property sections.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-xtensa.c13
2 files changed, 18 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 26a6f4d..6934c30 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2007-04-12 Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (elf_xtensa_gc_mark_hook): Don't follow references
+ from Xtensa property sections.
+
2007-04-12 Alan Modra <amodra@bigpond.net.au>
* elf32-spu.c (needs_ovl_stub): Test that spu_elf_section_data
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index 1d6fb42..10e00aa 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -969,6 +969,19 @@ elf_xtensa_gc_mark_hook (asection *sec,
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
{
+ /* Property sections are marked "KEEP" in the linker scripts, but they
+ should not cause other sections to be marked. (This approach relies
+ on elf_xtensa_discard_info to remove property table entries that
+ describe discarded sections. Alternatively, it might be more
+ efficient to avoid using "KEEP" in the linker scripts and instead use
+ the gc_mark_extra_sections hook to mark only the property sections
+ that describe marked sections. That alternative does not work well
+ with the current property table sections, which do not correspond
+ one-to-one with the sections they describe, but that should be fixed
+ someday.) */
+ if (xtensa_is_property_section (sec))
+ return NULL;
+
if (h != NULL)
switch (ELF32_R_TYPE (rel->r_info))
{