+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
};
/* Which symbols to remove. */
-static enum strip_action strip_symbols;
+static enum strip_action strip_symbols = STRIP_UNDEF;
enum locals_action
{
|| 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);