diff options
author | Nick Clifton <nickc@redhat.com> | 2017-03-02 17:10:20 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2017-03-02 17:10:20 +0000 |
commit | 05ed43104ef2c3f75779438111e2913dbd4555a6 (patch) | |
tree | 8358a6dc8d206b881664e270ba42bf56d872911d /binutils/objcopy.c | |
parent | f98450c6eee6878ebf5b052d231758026d250427 (diff) | |
download | binutils-05ed43104ef2c3f75779438111e2913dbd4555a6.zip binutils-05ed43104ef2c3f75779438111e2913dbd4555a6.tar.gz binutils-05ed43104ef2c3f75779438111e2913dbd4555a6.tar.bz2 |
Support merging build notes in sections without the SHF_GNU_BUILD_NOTE flag set.
* objcopy.c (is_merged_note_section): Support build note sections
without the SHF_GNU_BUILD_NOTE section flag set.
Diffstat (limited to 'binutils/objcopy.c')
-rw-r--r-- | binutils/objcopy.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/binutils/objcopy.c b/binutils/objcopy.c index baf6990..868f122 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -1217,7 +1217,11 @@ is_merged_note_section (bfd * abfd, asection * sec) && elf_section_data (sec)->this_hdr.sh_type == SHT_NOTE /* FIXME: We currently only support merging GNU_BUILD_NOTEs. We should add support for more note types. */ - && elf_section_data (sec)->this_hdr.sh_flags & SHF_GNU_BUILD_NOTE) + && ((elf_section_data (sec)->this_hdr.sh_flags & SHF_GNU_BUILD_NOTE) != 0 + /* Old versions of GAS (prior to 2.27) could not set the section + flags to OS-specific values, so we also accept sections with the + expected name. */ + || (strcmp (sec->name, GNU_BUILD_ATTRS_SECTION_NAME) == 0))) return TRUE; return FALSE; |