diff options
author | Kai Tietz <kai.tietz@onevision.com> | 2012-10-18 17:29:54 +0000 |
---|---|---|
committer | Kai Tietz <kai.tietz@onevision.com> | 2012-10-18 17:29:54 +0000 |
commit | 4fc8b8950a1aed53bc553c9003808f04919cc7ca (patch) | |
tree | da86eb256186f9dbbcf24365f08f5070187b157f /binutils | |
parent | c207c2c6cf049ab6095b55402752480e7fca53e0 (diff) | |
download | gdb-4fc8b8950a1aed53bc553c9003808f04919cc7ca.zip gdb-4fc8b8950a1aed53bc553c9003808f04919cc7ca.tar.gz gdb-4fc8b8950a1aed53bc553c9003808f04919cc7ca.tar.bz2 |
* objcopy.c (is_strip_section_1): Don't strip
.reloc section by default.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/objcopy.c | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 660d037..c9ccfaf 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -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 diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 40250ad..f44ebcd 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -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); |