2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 18 Mar 2005 15:46:25 +0000 (15:46 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 18 Mar 2005 15:46:25 +0000 (15:46 +0000)
* elflink.c (elf_mark_used_section): Check bfd_is_const_section
for special sections.

bfd/ChangeLog
bfd/elflink.c

index dd8612d452c81f2cdf88d76c178c45acf432f5d8..010c90035158a888584c44261e9d34081b37e28a 100644 (file)
@@ -1,3 +1,8 @@
+2005-03-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elflink.c (elf_mark_used_section): Check bfd_is_const_section
+       for special sections.
+
 2005-03-18  Alan Modra  <amodra@bigpond.net.au>
 
        * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
index 0bb49ea1c8df4b0b88f4dddf8785b75dc70bec19..1ddfe182c61615ed108a133444e4ae07a8f942dc 100644 (file)
@@ -9012,7 +9012,9 @@ elf_mark_used_section (struct elf_link_hash_entry *h,
       || h->root.type == bfd_link_hash_defweak)
     {
       asection *s = h->root.u.def.section;
-      if (s != NULL && s->output_section != NULL && s->output_section != s)
+      if (s != NULL
+         && s->output_section != NULL
+         && !bfd_is_const_section (s->output_section))
        s->output_section->flags |= SEC_KEEP;
     }