From 1173a0c1d916f19f7f5b90094b889318065fc97b Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 24 Feb 2012 10:54:46 +0000 Subject: [PATCH] PR ld/13730 * reloc.c (bfd_generic_get_relocated_section_contents): Issue an error message instead of aborting, when an outofrange reloc is encountered. --- bfd/ChangeLog | 7 +++++++ bfd/reloc.c | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 6503f5c14..cf9bf17b3 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2012-02-24 Nick Clifton + + 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 * mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): New. diff --git a/bfd/reloc.c b/bfd/reloc.c index 778276f42..ac1ecb5bd 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -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; -- 2.11.4.GIT