From a040981f6272e74d8157108e1677bc4d13425cd0 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 29 Jun 2012 21:54:44 +0000 Subject: [PATCH] Return FALSE on unresolvable relocation * elf64-x86-64.c (elf_x86_64_relocate_section): Return FALSE on unresolvable relocation. --- bfd/ChangeLog | 5 +++++ bfd/elf64-x86-64.c | 17 ++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 9ea3a1e407..921e6794cc 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2012-06-29 H.J. Lu + + * elf64-x86-64.c (elf_x86_64_relocate_section): Return FALSE + on unresolvable relocation. + 2012-06-29 H.J. Lu * archive.c (_bfd_compute_and_write_armap): Simplify global diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 03cd2f3eaa..a29ba8a324 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,