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>
Mon, 7 Aug 2017 11:56:09 +0000 (21:26 +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 694675f13803679d012ca7a3b5761f52d97b1f3c..5d045717170bacc2aa70fdc1e73ca02dc6379d67 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-07  Nick Clifton  <nickc@redhat.com>
 
        PR 21884
index 0cc5f871db914f0c66b16f93ad6db68e7c7eac7d..b89d537df51f209690d16d9d20d281a72dc404b1 100644 (file)
@@ -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);
This page took 0.033279 seconds and 4 git commands to generate.