ld/
authorAlan Modra <amodra@gmail.com>
Sun, 25 Mar 2012 06:45:16 +0000 (06:45 +0000)
committerAlan Modra <amodra@gmail.com>
Sun, 25 Mar 2012 06:45:16 +0000 (06:45 +0000)
* ldemul.c (before_allocation_default): Revert last change.
ldlang.c (lang_add_section): Likewise.
(strip_excluded_output_sections): Don't strip output sections with
user input sections when emitrelocations, unless all are SEC_EXCLUDE.
ld/testsuite/
* ld-powerpc/vxworks-relax.rd: Remove check on reloc section
file offset and reloc symbol indices.

ld/ChangeLog
ld/ldemul.c
ld/ldlang.c
ld/testsuite/ChangeLog
ld/testsuite/ld-powerpc/vxworks-relax.rd

index 4b9d324ecde67e6c02c1bed98bc5b2f975536952..f3b80950afd2d1ec76dfd90212655fb1c90cfb12 100644 (file)
@@ -1,3 +1,10 @@
+2012-03-25  Alan Modra  <amodra@gmail.com>
+
+       * ldemul.c (before_allocation_default): Revert last change.
+       ldlang.c (lang_add_section): Likewise.
+       (strip_excluded_output_sections): Don't strip output sections with
+       user input sections when emitrelocations, unless all are SEC_EXCLUDE.
+
 2012-03-23  Alan Modra  <amodra@gmail.com>
 
        * ldemul.c (before_allocation_default): When emitrelocations,
index 5e2fd82a0dd82fb3c2871ed2480b9bb44b26a9e6..85baeab325885696431ac428bd4b33f3c010e8a6 100644 (file)
@@ -237,7 +237,7 @@ after_allocation_default (void)
 void
 before_allocation_default (void)
 {
-  if (!link_info.relocatable && !link_info.emitrelocations)
+  if (!link_info.relocatable)
     strip_excluded_output_sections ();
 }
 
index 73e0179b016109e26ea18c4ce941ce46795078fd..b0c23cb44944e9f962609938759be8b035300acd 100644 (file)
@@ -2380,7 +2380,6 @@ lang_add_section (lang_statement_list_type *ptr,
   section->output_section = output->bfd_section;
 
   if (!link_info.relocatable
-      && !link_info.emitrelocations
       && !stripped_excluded_sections)
     {
       asection *s = output->bfd_section->map_tail.s;
@@ -3887,8 +3886,9 @@ strip_excluded_output_sections (void)
          asection *s;
 
          for (s = output_section->map_head.s; s != NULL; s = s->map_head.s)
-           if ((s->flags & SEC_LINKER_CREATED) != 0
-               && (s->flags & SEC_EXCLUDE) == 0)
+           if ((s->flags & SEC_EXCLUDE) == 0
+               && ((s->flags & SEC_LINKER_CREATED) != 0
+                   || link_info.emitrelocations))
              {
                exclude = FALSE;
                break;
index 42c04ffa130199316bdd3add0abe27d33155cb30..dc8643beecfa8b01144b1dc37058c051ca9677ed 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-25  Alan Modra  <amodra@gmail.com>
+
+       * ld-powerpc/vxworks-relax.rd: Remove check on reloc section
+       file offset and reloc symbol indices.
+
 2012-03-21  Hans-Peter Nilsson  <hp@axis.com>
 
        PR ld/13813
index e28094c0c115031095b7ee2bd6ee6f60d6767849..572c74ddf459ee5610b25b6dda687d2982cc40d5 100644 (file)
@@ -1,9 +1,9 @@
 
-Relocation section '.rela.text' at offset 0x4010150 contains 6 entries:
+Relocation section '.rela.text' at offset .* contains 6 entries:
  Offset     Info    Type            Sym.Value  Sym. Name \+ Addend
-00080012  00000106 R_PPC_ADDR16_HA   00080000   .text \+ 4000020
-00080016  00000104 R_PPC_ADDR16_LO   00080000   .text \+ 4000020
-00080006  00000106 R_PPC_ADDR16_HA   00080000   .text \+ 4000020
-0008000a  00000104 R_PPC_ADDR16_LO   00080000   .text \+ 4000020
-0408002a  00000306 R_PPC_ADDR16_HA   00080000   _start \+ 0
-0408002e  00000304 R_PPC_ADDR16_LO   00080000   _start \+ 0
+00080012  .* R_PPC_ADDR16_HA   00080000   .text \+ 4000020
+00080016  .* R_PPC_ADDR16_LO   00080000   .text \+ 4000020
+00080006  .* R_PPC_ADDR16_HA   00080000   .text \+ 4000020
+0008000a  .* R_PPC_ADDR16_LO   00080000   .text \+ 4000020
+0408002a  .* R_PPC_ADDR16_HA   00080000   _start \+ 0
+0408002e  .* R_PPC_ADDR16_LO   00080000   _start \+ 0
This page took 0.030388 seconds and 4 git commands to generate.