This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: Return FALSE on unresolvable relocation
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sourceware dot org
- Date: Fri, 29 Jun 2012 14:55:32 -0700
- Subject: PATCH: Return FALSE on unresolvable relocation
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
I checked in this patch to return FALSE on unresolvable relocation.
H.J.
---
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 9ea3a1e..921e679 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
2012-06-29 H.J. Lu <hongjiu.lu@intel.com>
+ * elf64-x86-64.c (elf_x86_64_relocate_section): Return FALSE
+ on unresolvable relocation.
+
+2012-06-29 H.J. Lu <hongjiu.lu@intel.com>
+
* archive.c (_bfd_compute_and_write_armap): Simplify global
symbol handling.
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 03cd2f3..a29ba8a 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -4210,13 +4210,16 @@ elf_x86_64_relocate_section (bfd *output_bfd,
&& h->def_dynamic)
&& _bfd_elf_section_offset (output_bfd, info, input_section,
rel->r_offset) != (bfd_vma) -1)
- (*_bfd_error_handler)
- (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
- input_bfd,
- input_section,
- (long) rel->r_offset,
- howto->name,
- h->root.root.string);
+ {
+ (*_bfd_error_handler)
+ (_("%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"),
+ input_bfd,
+ input_section,
+ (long) rel->r_offset,
+ howto->name,
+ h->root.root.string);
+ return FALSE;
+ }
do_relocation:
r = _bfd_final_link_relocate (howto, input_bfd, input_section,