diff options
author | Alan Modra <amodra@gmail.com> | 2017-08-07 18:02:49 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-08-07 21:26:09 +0930 |
commit | b3293efaf8ddef1eba52de14be47e3d33bbce35a (patch) | |
tree | 6172bda76041f31165b5bdc6aa55c912ef8fb800 /bfd | |
parent | 74cbb09e74dda17fc79e2ce709116780a90310ef (diff) | |
download | binutils-gdb-b3293efaf8ddef1eba52de14be47e3d33bbce35a.tar.gz |
PR21910, segfault in common symbol override test when hash-style=gnu
PR 21910
* elflink.c (bfd_elf_final_link): Don't segfault when sections
needed to define various dynamic tags have been discarded.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elflink.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 694675f1380..5d045717170 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2017-08-07 Alan Modra <amodra@gmail.com> + + PR 21910 + * elflink.c (bfd_elf_final_link): Don't segfault when sections + needed to define various dynamic tags have been discarded. + 2017-08-07 Nick Clifton <nickc@redhat.com> PR 21884 diff --git a/bfd/elflink.c b/bfd/elflink.c index 0cc5f871db9..b89d537df51 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); |