Fix internal error in the linker by replacing a call to abort with an error message.
authorNick Clifton <nickc@redhat.com>
Wed, 7 Dec 2016 10:19:42 +0000 (10:19 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 7 Dec 2016 10:19:42 +0000 (10:19 +0000)
PR ld/20932
* elflink.c (bfd_elf_record_link_assignment): Replace call to
abort with an error message and error return value.

bfd/ChangeLog
bfd/elflink.c

index 26fb42b8e44f17f9fae9b97661c240af5c8ed652..7c21bb893b4d07ad3ef2b2fa8e7828e75b9fccda 100644 (file)
@@ -1,3 +1,9 @@
+2016-12-07  Nick Clifton  <nickc@redhat.com>
+
+       PR ld/20932
+       * elflink.c (bfd_elf_record_link_assignment): Replace call to
+       abort with an error message and error return value.
+
 2016-12-06  Nick Clifton  <nickc@redhat.com>
 
        PR binutils/20931
index 320f3bea433eb370aad6cd35f9a58123f6690a74..49c38032fe5c4645bf6aa7b7e5ef41be876aa520 100644 (file)
@@ -625,8 +625,11 @@ bfd_elf_record_link_assignment (bfd *output_bfd,
       (*bed->elf_backend_copy_indirect_symbol) (info, h, hv);
       break;
     case bfd_link_hash_warning:
-      abort ();
-      break;
+      /* See PR 20932 for a reproducer.  */
+      _bfd_error_handler (_("%B: Attempt to assign a value to warning symbol '%s'"),
+                         output_bfd, name);
+      bfd_set_error (bfd_error_invalid_operation);
+      return FALSE;
     }
 
   /* If this symbol is being provided by the linker script, and it is
This page took 0.030118 seconds and 4 git commands to generate.