x86: Call rtype_to_howto to get reloc_howto_type pointer
[deliverable/binutils-gdb.git] / bfd / elf64-x86-64.c
index 8e886b00c4853978892cc26354002b022afa8097..204067cb7336bb217a4c1ee75f40e35c4f1134c7 100644 (file)
@@ -2443,15 +2443,10 @@ elf_x86_64_relocate_section (bfd *output_bfd,
          rel->r_info = htab->r_info (r_symndx, r_type);
        }
 
-      if (r_type >= (int) R_X86_64_standard)
+      howto = elf_x86_64_rtype_to_howto (input_bfd, r_type);
+      if (howto == NULL)
        return _bfd_unrecognized_reloc (input_bfd, input_section, r_type);
 
-      if (r_type != (int) R_X86_64_32
-         || ABI_64_P (output_bfd))
-       howto = x86_64_elf_howto_table + r_type;
-      else
-       howto = (x86_64_elf_howto_table
-                + ARRAY_SIZE (x86_64_elf_howto_table) - 1);
       h = NULL;
       sym = NULL;
       sec = NULL;
This page took 0.023619 seconds and 4 git commands to generate.