diff options
author | Alan Modra <amodra@gmail.com> | 2010-06-29 08:47:40 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2010-06-29 08:47:40 +0000 |
commit | 6c67a030ce04a37726d3287e4009e3f7dce2f795 (patch) | |
tree | 965d0ae358f6b65164c37a1d3f2818279d6c8be7 /binutils | |
parent | a480d2f6c8f7b90b797f240063b58f07e43ee011 (diff) | |
download | gdb-6c67a030ce04a37726d3287e4009e3f7dce2f795.zip gdb-6c67a030ce04a37726d3287e4009e3f7dce2f795.tar.gz gdb-6c67a030ce04a37726d3287e4009e3f7dce2f795.tar.bz2 |
PR binutils/3166
* objcopy.c (is_strip_section): Revert 2006-09-05.
(setup_section): Make SHT_GROUP section nobits.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 6 | ||||
-rw-r--r-- | binutils/objcopy.c | 16 |
2 files changed, 11 insertions, 11 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 0ec96c0..0007863 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,5 +1,11 @@ 2010-06-29 Alan Modra <amodra@gmail.com> + PR binutils/3166 + * objcopy.c (is_strip_section): Revert 2006-09-05. + (setup_section): Make SHT_GROUP section nobits. + +2010-06-29 Alan Modra <amodra@gmail.com> + * configure: Regenerate. * po/POTFILES.in: Regenerate. diff --git a/binutils/objcopy.c b/binutils/objcopy.c index a9b0d37..c7cd1b5 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -942,12 +942,6 @@ is_strip_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec) asymbol *gsym; const char *gname; - /* PR binutils/3166 - Group sections look like debugging sections but they are not. - (They have a non-zero size but they are not ALLOCated). */ - if (strip_symbols == STRIP_NONDEBUG) - return TRUE; - /* PR binutils/3181 If we are going to strip the group signature symbol, then strip the group section too. */ @@ -2419,11 +2413,11 @@ setup_section (bfd *ibfd, sec_ptr isection, void *obfdarg) if (p != NULL && p->set_flags) flags = p->flags | (flags & (SEC_HAS_CONTENTS | SEC_RELOC)); else if (strip_symbols == STRIP_NONDEBUG - && (flags & SEC_ALLOC) != 0 - && (ibfd->xvec->flavour != bfd_target_elf_flavour - || elf_section_type (isection) != SHT_NOTE)) + && (flags & (SEC_ALLOC | SEC_GROUP)) != 0 + && !(ibfd->xvec->flavour == bfd_target_elf_flavour + && elf_section_type (isection) == SHT_NOTE)) { - flags &= ~(SEC_HAS_CONTENTS | SEC_LOAD); + flags &= ~(SEC_HAS_CONTENTS | SEC_LOAD | SEC_GROUP); if (obfd->xvec->flavour == bfd_target_elf_flavour) { make_nobits = TRUE; @@ -2432,7 +2426,7 @@ setup_section (bfd *ibfd, sec_ptr isection, void *obfdarg) elf.c:copy_private_bfd_data that section flags have not changed between input and output sections. This hack prevents wholesale rewriting of the program headers. */ - isection->flags &= ~(SEC_HAS_CONTENTS | SEC_LOAD); + isection->flags &= ~(SEC_HAS_CONTENTS | SEC_LOAD | SEC_GROUP); } } |