diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2025-02-10 08:38:57 +0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2025-02-10 08:44:02 +0800 |
commit | 64da7fa527463f505bd085cd29cf57d8d5b6e8ef (patch) | |
tree | 5df02adb7584c5178db54f101f86ee9b75d45de4 | |
parent | c17d862be9ec64eaa2319e21955bd62cf0e55d3b (diff) | |
download | binutils-64da7fa527463f505bd085cd29cf57d8d5b6e8ef.zip binutils-64da7fa527463f505bd085cd29cf57d8d5b6e8ef.tar.gz binutils-64da7fa527463f505bd085cd29cf57d8d5b6e8ef.tar.bz2 |
x86-64: Use x86_64_elf_howto_table for standard relocations
For standard relocations, use x86_64_elf_howto_table, instead of calling
elf_x86_64_rtype_to_howto.
* elf64-x86-64.c (elf_x86_64_tls_transition): Use
x86_64_elf_howto_table, instead of elf_x86_64_rtype_to_howto.
(elf_x86_64_convert_load_reloc): Use x86_64_elf_howto_table,
instead of elf_x86_64_rtype_to_howto, for R_X86_64_PC32.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
-rw-r--r-- | bfd/elf64-x86-64.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index feb8827..9244f86 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -1649,8 +1649,8 @@ elf_x86_64_tls_transition (struct bfd_link_info *info, bfd *abfd, { reloc_howto_type *from, *to; - from = elf_x86_64_rtype_to_howto (abfd, from_type); - to = elf_x86_64_rtype_to_howto (abfd, to_type); + from = &x86_64_elf_howto_table[from_type]; + to = &x86_64_elf_howto_table[to_type]; if (from == NULL || to == NULL) return false; @@ -2065,7 +2065,7 @@ elf_x86_64_convert_load_reloc (bfd *abfd, r_type = R_X86_64_PC32; /* Skip if the converted relocation will overflow. */ - howto = elf_x86_64_rtype_to_howto (abfd, r_type); + howto = &x86_64_elf_howto_table[r_type]; r = _bfd_final_link_relocate (howto, abfd, input_section, contents, irel->r_offset, relocation, raddend); @@ -2250,7 +2250,7 @@ elf_x86_64_convert_load_reloc (bfd *abfd, r_type = R_X86_64_PC32; /* Skip if the converted relocation will overflow. */ - howto = elf_x86_64_rtype_to_howto (abfd, r_type); + howto = &x86_64_elf_howto_table[r_type]; r = _bfd_final_link_relocate (howto, abfd, input_section, contents, irel->r_offset, relocation, |