PR25351 .ARM.attributes not found for symbol
authorAlan Modra <amodra@gmail.com>
Wed, 8 Jan 2020 01:06:01 +0000 (11:36 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 8 Jan 2020 10:51:17 +0000 (21:21 +1030)
PR 25351
* elflink.c (bfd_elf_final_link): Call _bfd_fix_excluded_sec_syms
after removing sections.

bfd/ChangeLog
bfd/elflink.c

index da9260b10539a39c0ce3009270a814bed1cec426..306f2e651243f809f1522bfb8158a8bfd209fdd5 100644 (file)
@@ -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
index 2f804dbe6e51f550794b5c9815b45864746ce9e1..300be3f7437fdd8dc84709521789edb109d759af 100644 (file)
@@ -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
This page took 0.03041 seconds and 4 git commands to generate.