diff options
author | Alan Modra <amodra@gmail.com> | 2020-01-08 11:36:01 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-01-08 21:21:17 +1030 |
commit | 4c6ee6465acc58f0f86c44668c4e862901186239 (patch) | |
tree | 8ab5279e1498be0e431b277198cce9753bd2bf1b /bfd | |
parent | 27eea7ff8e66a9e317e00f949e3e7cedf78946b9 (diff) | |
download | gdb-4c6ee6465acc58f0f86c44668c4e862901186239.zip gdb-4c6ee6465acc58f0f86c44668c4e862901186239.tar.gz gdb-4c6ee6465acc58f0f86c44668c4e862901186239.tar.bz2 |
PR25351 .ARM.attributes not found for symbol
PR 25351
* elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms
after removing sections.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elflink.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index da9260b..306f2e6 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2020-01-08 Alan Modra <amodra@gmail.com> + + PR 25351 + * elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms + after removing sections. + 2020-01-06 Jim Wilson <jimw@sifive.com> PR 25205 diff --git a/bfd/elflink.c b/bfd/elflink.c index 2f804db..300be3f 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -11820,6 +11820,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) bfd_vma attr_size = 0; const char *std_attrs_section; struct elf_link_hash_table *htab = elf_hash_table (info); + bfd_boolean sections_removed; if (!is_elf_hash_table (htab)) return FALSE; @@ -11866,6 +11867,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) /* The object attributes have been merged. Remove the input sections from the link, and set the contents of the output section. */ + sections_removed = FALSE; std_attrs_section = get_elf_backend_data (abfd)->obj_attrs_section; for (o = abfd->sections; o != NULL; o = o->next) { @@ -11905,8 +11907,11 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) o->flags |= SEC_EXCLUDE; bfd_section_list_remove (abfd, o); abfd->section_count--; + sections_removed = TRUE; } } + if (sections_removed) + _bfd_fix_excluded_sec_syms (abfd, info); /* Count up the number of relocations we will output for each output section, so that we know the sizes of the reloc sections. We |