diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2018-12-20 13:25:41 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2018-12-20 13:25:41 -0800 |
commit | 76268e027479f587b46b70b69760f1b96204bc28 (patch) | |
tree | ef1c6627b8917da5b8e536264b58579ef4efde74 /bfd/elf32-i386.c | |
parent | Ensure deterministic result order in gdb.ada/info_auto_lang.exp (diff) | |
download | binutils-gdb-76268e027479f587b46b70b69760f1b96204bc28.tar.gz binutils-gdb-76268e027479f587b46b70b69760f1b96204bc28.tar.bz2 binutils-gdb-76268e027479f587b46b70b69760f1b96204bc28.zip |
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/elf32-i386.c')
-rw-r--r-- | bfd/elf32-i386.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 7fe6afb8cfc..f470b824d35 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -2080,15 +2080,10 @@ elf_i386_relocate_section (bfd *output_bfd, continue; } - if ((indx = r_type) >= R_386_standard - && ((indx = r_type - R_386_ext_offset) - R_386_standard - >= R_386_ext - R_386_standard) - && ((indx = r_type - R_386_tls_offset) - R_386_ext - >= R_386_ext2 - R_386_ext)) + howto = elf_i386_rtype_to_howto (input_bfd, r_type); + if (howto == NULL) return _bfd_unrecognized_reloc (input_bfd, input_section, r_type); - howto = elf_howto_table + indx; - r_symndx = ELF32_R_SYM (rel->r_info); h = NULL; sym = NULL; |