bfd/
authorBob Wilson <bob.wilson@acm.org>
Thu, 12 Apr 2007 15:52:02 +0000 (15:52 +0000)
committerBob Wilson <bob.wilson@acm.org>
Thu, 12 Apr 2007 15:52:02 +0000 (15:52 +0000)
* 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.

bfd/ChangeLog
bfd/elf32-xtensa.c
ld/ChangeLog
ld/emulparams/elf32xtensa.sh

index 26a6f4db0ce9f8face6d0753f90870a882386245..6934c3015450dc00e0cc99fce9ae58daeab186ec 100644 (file)
@@ -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
index 1d6fb42e6a94959fc0b9b5687ee776d0d78409aa..10e00aa27da8ac2d1e49e659b67bde32d2e00363 100644 (file)
@@ -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))
       {
index e38237f2ac46150ee12854d360ab33be32393b24..5ea8cac0cc33a39c3e7823396708f44520fcb0d1 100644 (file)
@@ -1,3 +1,7 @@
+2007-04-12  Bob Wilson  <bob.wilson@acm.org>
+       
+       * emulparams/elf32xtensa.sh (OTHER_SECTIONS): KEEP property sections.
+       
 2007-04-10  Richard Henderson  <rth@redhat.com>
 
        * ldlang.c (relax_sections): Initialize and increment
index f3424336bbe2b6ffda828ca6b01b74dc77dcb90f..216d7618040669a2c591d448970a451ec5d63e99 100644 (file)
@@ -36,7 +36,7 @@ OTHER_SDATA_SECTIONS="
   }
 "
 OTHER_SECTIONS="
-  .xt.lit       0 : { *(.xt.lit${RELOCATING+ .xt.lit.* .gnu.linkonce.p.*}) }
-  .xt.insn      0 : { *(.xt.insn${RELOCATING+ .gnu.linkonce.x.*}) }
-  .xt.prop      0 : { *(.xt.prop${RELOCATING+ .xt.prop.* .gnu.linkonce.prop.*}) }
+  .xt.lit       0 : { KEEP (*(.xt.lit${RELOCATING+ .xt.lit.* .gnu.linkonce.p.*})) }
+  .xt.insn      0 : { KEEP (*(.xt.insn${RELOCATING+ .gnu.linkonce.x.*})) }
+  .xt.prop      0 : { KEEP (*(.xt.prop${RELOCATING+ .xt.prop.* .gnu.linkonce.prop.*})) }
 "
This page took 0.035561 seconds and 4 git commands to generate.