]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR21910, segfault in common symbol override test when hash-style=gnu
authorAlan Modra <amodra@gmail.com>
Mon, 7 Aug 2017 08:32:49 +0000 (18:02 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 23 Aug 2017 03:18:16 +0000 (12:48 +0930)
PR 21910
* elflink.c (bfd_elf_final_link): Don't segfault when sections
needed to define various dynamic tags have been discarded.

bfd/ChangeLog
bfd/elflink.c

index 37c6665f17cbaf392dde83cee2943374b964de36..8ac8332ee0c1b2c7eb12435b26eca51e3d1580bb 100644 (file)
@@ -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-05  Alan Modra  <amodra@gmail.com>
 
        * elf32-hppa.c (elf32_hppa_set_gp): Don't require an
index bb1a30a8c5a9aa0d0fe470638507805637a22e1c..13647bbb81a0e15367f7eb7e982b758ec60cd552 100644 (file)
@@ -12338,7 +12338,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);