aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-x86-64.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2018-12-20 13:25:41 -0800
committerH.J. Lu <hjl.tools@gmail.com>2018-12-20 13:25:41 -0800
commit76268e027479f587b46b70b69760f1b96204bc28 (patch)
treeef1c6627b8917da5b8e536264b58579ef4efde74 /bfd/elf64-x86-64.c
parent161d081c56f12e7a00d8a07ccac445855d5d357b (diff)
downloadgdb-76268e027479f587b46b70b69760f1b96204bc28.zip
gdb-76268e027479f587b46b70b69760f1b96204bc28.tar.gz
gdb-76268e027479f587b46b70b69760f1b96204bc28.tar.bz2
x86: Call rtype_to_howto to get reloc_howto_type pointer
* elf32-i386.c (elf_i386_relocate_section): Call elf_i386_rtype_to_howto to get reloc_howto_type pointer. * elf64-x86-64.c (elf_x86_64_relocate_section): Call elf_x86_64_rtype_to_howto to get reloc_howto_type pointer.
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r--bfd/elf64-x86-64.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 8e886b0..204067c 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -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;