aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2005-03-18 15:46:25 +0000
committerH.J. Lu <hjl.tools@gmail.com>2005-03-18 15:46:25 +0000
commit257a4820343d480520b72e5b25e07c94b2502684 (patch)
treea3e9aa34477101c38b4edc3446d57a2c1f591b74 /bfd/elflink.c
parent41c7ba7cc251f99e099fb60e1868b951ea5a686f (diff)
downloadgdb-257a4820343d480520b72e5b25e07c94b2502684.zip
gdb-257a4820343d480520b72e5b25e07c94b2502684.tar.gz
gdb-257a4820343d480520b72e5b25e07c94b2502684.tar.bz2
2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
* elflink.c (elf_mark_used_section): Check bfd_is_const_section for special sections.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 0bb49ea..1ddfe18 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -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;
}