PR ld/13730
authorNick Clifton <nickc@redhat.com>
Fri, 24 Feb 2012 10:54:47 +0000 (10:54 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 24 Feb 2012 10:54:47 +0000 (10:54 +0000)
* reloc.c (bfd_generic_get_relocated_section_contents): Issue an
error message instead of aborting, when an outofrange reloc is
encountered.

bfd/ChangeLog
bfd/reloc.c

index 6503f5c14c4108d0da99d5c9092cbf3f5ca4a5ee..cf9bf17b3231601a58db4b3c66341197d4ae8297 100644 (file)
@@ -1,3 +1,10 @@
+2012-02-24  Nick Clifton  <nickc@redhat.com>
+
+       PR ld/13730
+       * reloc.c (bfd_generic_get_relocated_section_contents): Issue an
+       error message instead of aborting, when an outofrange reloc is
+       encountered.
+
 2012-02-23  Iain Sandoe  <idsandoe@googlemail.com>
 
        * mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): New.
index 778276f4278dc322b59b581fdecc2cbdabc67027..ac1ecb5bda17b25a545c6d4d558160950b4d9eba 100644 (file)
@@ -6394,6 +6394,15 @@ bfd_generic_get_relocated_section_contents (bfd *abfd,
                    goto error_return;
                  break;
                case bfd_reloc_outofrange:
+                 /* PR ld/13730:
+                    This error can result when processing some partially
+                    complete binaries.  Do not abort, but issue an error
+                    message instead.  */
+                 link_info->callbacks->einfo
+                   (_("%X%P: %B(%A): relocation \"%R\" goes out of range\n"),
+                    abfd, input_section, * parent);
+                 goto error_return;
+
                default:
                  abort ();
                  break;