This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PR21910, segfault in common symbol override test when hash-style=gnu
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Mon, 7 Aug 2017 20:53:40 +0930
- Subject: PR21910, segfault in common symbol override test when hash-style=gnu
- Authentication-results: sourceware.org; auth=none
PR 21910
* elflink.c (bfd_elf_final_link): Don't segfault when sections
needed to define various tags have been discarded.
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 0cc5f87..b89d537 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -12342,7 +12342,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
get_vma:
o = bfd_get_linker_section (dynobj, name);
do_vma:
- if (o == NULL)
+ if (o == NULL || bfd_is_abs_section (o->output_section))
{
_bfd_error_handler
(_("could not find section %s"), name);
--
Alan Modra
Australia Development Lab, IBM