Return FALSE on unresolvable relocation
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 29 Jun 2012 21:54:44 +0000 (21:54 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 29 Jun 2012 21:54:44 +0000 (21:54 +0000)
* elf64-x86-64.c (elf_x86_64_relocate_section): Return FALSE
on unresolvable relocation.

bfd/ChangeLog
bfd/elf64-x86-64.c

index 9ea3a1e407eb5702a6874133c80dfb711e466617..921e6794ccbf9fed9365a2263af730cddd63b020 100644 (file)
@@ -1,3 +1,8 @@
+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
index 03cd2f3eaa2e2cb808536687ea29f8fdf6732bdf..a29ba8a324c3adbff9fe5969b7d09d88e9c7a65b 100644 (file)
@@ -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,