bfd: partial revert commit EC1ACAB (prevent all but undef weak symbols to become...
[deliverable/binutils-gdb.git] / bfd / elf-properties.c
index 2d054dd8b45622d3cc5b95103d8fdf5398704420..13d620d9c47478e7906eecda22422b4d8568571d 100644 (file)
@@ -318,7 +318,7 @@ _bfd_elf_link_setup_gnu_properties (struct bfd_link_info *info)
   /* Find the first relocatable ELF input with GNU properties.  */
   for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link.next)
     if (bfd_get_flavour (abfd) == bfd_target_elf_flavour
-       && bfd_count_sections (abfd) != 0
+       && (abfd->flags & DYNAMIC) == 0
        && elf_properties (abfd) != NULL)
       {
        has_properties = TRUE;
@@ -342,7 +342,7 @@ _bfd_elf_link_setup_gnu_properties (struct bfd_link_info *info)
 
   /* Merge .note.gnu.property sections.  */
   for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link.next)
-    if (abfd != first_pbfd && bfd_count_sections (abfd) != 0)
+    if (abfd != first_pbfd && (abfd->flags & DYNAMIC) == 0)
       {
        elf_property_list *null_ptr = NULL;
        elf_property_list **listp = &null_ptr;
This page took 0.023391 seconds and 4 git commands to generate.