* objcopy.c (is_strip_section_1): Don't strip
authorKai Tietz <kai.tietz@onevision.com>
Thu, 18 Oct 2012 17:29:54 +0000 (17:29 +0000)
committerKai Tietz <kai.tietz@onevision.com>
Thu, 18 Oct 2012 17:29:54 +0000 (17:29 +0000)
        .reloc section by default.

binutils/ChangeLog
binutils/objcopy.c

index 660d0374226d49b8d986d263456ea7c3f29c97f4..c9ccfafd1555c3ed3e244981740a2b13a035f35c 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-18  Kai Tietz  <ktietz@redhat.com>
+
+       * objcopy.c (is_strip_section_1): Don't strip
+       .reloc section by default.
+
 2012-10-11  Doug Evans  <dje@google.com>
 
        * dwarf.c (display_gdb_index): Include static/global information
index 40250adc4bb656a0099a82f0149b3fdcf913c8a5..f44ebcd942a4f14f9b531e2c13096fd9b424a844 100644 (file)
@@ -102,7 +102,7 @@ enum strip_action
   };
 
 /* Which symbols to remove.  */
-static enum strip_action strip_symbols;
+static enum strip_action strip_symbols = STRIP_UNDEF;
 
 enum locals_action
   {
@@ -977,7 +977,13 @@ is_strip_section_1 (bfd *abfd ATTRIBUTE_UNUSED, asection *sec)
          || strip_symbols == STRIP_ALL
          || discard_locals == LOCALS_ALL
          || convert_debugging)
-       return TRUE;
+       {
+         /* By default we don't want to strip .reloc section.
+            This section has for pe-coff special meaning.   See
+            pe-dll.c file in ld, and peXXigen.c in bfd for details.  */
+         if (strcmp (bfd_get_section_name (abfd, sec), ".reloc") != 0)
+           return TRUE;
+       }
 
       if (strip_symbols == STRIP_DWO)
        return is_dwo_section (abfd, sec);
This page took 0.030573 seconds and 4 git commands to generate.