Check R_X86_64_standard for unrecognized relocation
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 21 Dec 2012 20:54:59 +0000 (20:54 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 21 Dec 2012 20:54:59 +0000 (20:54 +0000)
* elf64-x86-64.c (elf_x86_64_relocate_section): Check
R_X86_64_standard instead of R_X86_64_max for unrecognized
relocation.

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

index 48f94dad2228187e96a0600183511724e79f50be..ec7d98f750f0fbf02d180a6dde66ae8074b9f8e0 100644 (file)
@@ -1,3 +1,9 @@
+2012-12-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf64-x86-64.c (elf_x86_64_relocate_section): Check
+       R_X86_64_standard instead of R_X86_64_max for unrecognized
+       relocation.
+
 2012-12-21  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/14980
index 11ec917e696baf61ee9db4fa0ebcb2010bd14049..92bf991387f6168bff9ef2486e461144742aa798 100644 (file)
@@ -3207,8 +3207,11 @@ elf_x86_64_relocate_section (bfd *output_bfd,
          || r_type == (int) R_X86_64_GNU_VTENTRY)
        continue;
 
-      if (r_type >= R_X86_64_max)
+      if (r_type >= (int) R_X86_64_standard)
        {
+         (*_bfd_error_handler)
+           (_("%B: unrecognized relocation (0x%x) in section `%A'"),
+            input_bfd, input_section, r_type);
          bfd_set_error (bfd_error_bad_value);
          return FALSE;
        }
This page took 0.027846 seconds and 4 git commands to generate.