H.J. Lu
5bc71c2a6b
x86-64: Add R_X86_64_CODE_6_GOTTPOFF
For
add %reg1, name@gottpoff(%rip), %reg2
and
add name@gottpoff(%rip), %reg1, %reg2
add
#define R_X86_64_CODE_6_GOTTPOFF 50
if the instruction starts at 6 bytes before the relocation offset.
They are similar to R_X86_64_GOTTPOFF. Linker can covert GOTTPOFF to
add $name@tpoff, %reg1, %reg2
Rewrite fx_tcbit, fx_tcbit2 and fx_tcbit3 usage to generate
R_X86_64_GOTPCRELX, R_X86_64_REX_GOTPCRELX, R_X86_64_CODE_4_GOTPCRELX,
R_X86_64_CODE_4_GOTTPOFF, R_X86_64_CODE_4_GOTPC32_TLSDESC and
R_X86_64_CODE_6_GOTTPOFF.
NB: There is no need to check BFD_RELOC_X86_64_CODE_4_GOTTPOFF in
md_assemble since there is only BFD_RELOC_X86_64_GOTTPOFF at this
stage, which will be converted to BFD_RELOC_X86_64_CODE_4_GOTTPOFF
or BFD_RELOC_X86_64_CODE_6_GOTTPOFF in i386_validate_fix.
5 relocations:
#define R_X86_64_CODE_5_GOTPCRELX 46
#define R_X86_64_CODE_5_GOTTPOFF 47
#define R_X86_64_CODE_5_GOTPC32_TLSDESC 48
#define R_X86_64_CODE_6_GOTPCRELX 49
#define R_X86_64_CODE_6_GOTPC32_TLSDESC 51
are added for completeness and they are unused.
bfd/
* elf64-x86-64.c (x86_64_elf_howto_table): Add
R_X86_64_CODE_5_GOTPCRELX, R_X86_64_CODE_5_GOTTPOFF,
R_X86_64_CODE_5_GOTPC32_TLSDESC, R_X86_64_CODE_6_GOTPCRELX,
R_X86_64_CODE_6_GOTTPOFF and R_X86_64_CODE_6_GOTPC32_TLSDESC.
(R_X86_64_standard): Updated.
(x86_64_reloc_map): Add R_X86_64_CODE_5_GOTPCRELX,
R_X86_64_CODE_5_GOTTPOFF, R_X86_64_CODE_5_GOTPC32_TLSDESC,
R_X86_64_CODE_6_GOTPCRELX, R_X86_64_CODE_6_GOTTPOFF and
R_X86_64_CODE_6_GOTPC32_TLSDESC.
(elf_x86_64_check_tls_transition): Handle
R_X86_64_CODE_6_GOTTPOFF.
(elf_x86_64_tls_transition): Likewise.
(elf_x86_64_scan_relocs): Handle R_X86_64_CODE_6_GOTTPOFF.
Issue an error for R_X86_64_CODE_5_GOTPCRELX,
R_X86_64_CODE_5_GOTTPOFF, R_X86_64_CODE_5_GOTPC32_TLSDESC,
R_X86_64_CODE_6_GOTPCRELX and R_X86_64_CODE_6_GOTPC32_TLSDESC.
(elf_x86_64_relocate_section): Handle R_X86_64_CODE_6_GOTTPOFF.
* reloc.c (bfd_reloc_code_real): Add
BFD_RELOC_X86_64_CODE_5_GOTPCRELX,
BFD_RELOC_X86_64_CODE_5_GOTTPOFF,
BFD_RELOC_X86_64_CODE_5_GOTPC32_TLSDESC,
BFD_RELOC_X86_64_CODE_6_GOTPCRELX,
BFD_RELOC_X86_64_CODE_6_GOTTPOFF and
BFD_RELOC_X86_64_CODE_6_GOTPC32_TLSDESC.
* bfd-in2.h: Regenerated.
* libbfd.h: Likewise.
elfcpp/
* x86_64.h (R_X86_64_CODE_5_GOTPCRELX): New.
(R_X86_64_CODE_5_GOTTPOFF): Likewise.
(R_X86_64_CODE_5_GOTPC32_TLSDESC): Likewise.
(R_X86_64_CODE_6_GOTPCRELX): Likewise.
(R_X86_64_CODE_6_GOTTPOFF): Likewise.
(R_X86_64_CODE_6_GOTPC32_TLSDESC): Likewise.
gas/
* config/tc-i386.c (tc_i386_fix_adjustable): Handle
BFD_RELOC_X86_64_CODE_6_GOTTPOFF.
(md_assemble): Don't check BFD_RELOC_X86_64_CODE_4_GOTTPOFF.
Allow "add %reg1, foo@gottpoff(%rip), %reg2".
(output_disp): Handle BFD_RELOC_X86_64_CODE_6_GOTTPOFF. Rewrite
setting fx_tcbitX bits for BFD_RELOC_X86_64_GOTTPOFF,
BFD_RELOC_X86_64_GOTPC32_TLSDESC and BFD_RELOC_32_PCREL.
(md_apply_fix): Handle BFD_RELOC_X86_64_CODE_6_GOTTPOFF.
(i386_validate_fix): Rewrite fx_tcbitX bit checking for
BFD_RELOC_X86_64_GOTTPOFF, BFD_RELOC_X86_64_GOTPC32_TLSDESC and
BFD_RELOC_32_PCREL.
(tc_gen_reloc): Handle BFD_RELOC_X86_64_CODE_6_GOTTPOFF.
* testsuite/gas/i386/x86-64-gottpoff.d: Updated.
* testsuite/gas/i386/x86-64-gottpoff.s: Add tests for
"add %reg1, foo@gottpoff(%rip), %reg2" and
"add foo@gottpoff(%rip), %reg, %reg2".
gold/
* x86_64.cc (Target_x86_64::optimize_tls_reloc): Handle
R_X86_64_CODE_6_GOTTPOFF.
(Target_x86_64::Scan::get_reference_flags): Likewise.
(Target_x86_64::Scan::local): Likewise.
(Target_x86_64::Scan::global): Likewise.
(Target_x86_64::Relocate::relocate): Likewise.
(Target_x86_64::Relocate::relocate_tls): Likewise.
(Target_x86_64::Relocate::tls_ie_to_le): Handle.
R_X86_64_CODE_6_GOTTPOFF.
* testsuite/x86_64_ie_to_le.s: Add tests for
"add %reg1, foo@gottpoff(%rip), %reg2" and
"add foo@gottpoff(%rip), %reg, %reg2".
* testsuite/x86_64_ie_to_le.sh: Updated.
include/
* elf/x86-64.h (elf_x86_64_reloc_type): Add
R_X86_64_CODE_5_GOTPCRELX, R_X86_64_CODE_5_GOTTPOFF,
R_X86_64_CODE_5_GOTPC32_TLSDESC, R_X86_64_CODE_6_GOTPCRELX,
R_X86_64_CODE_6_GOTTPOFF and R_X86_64_CODE_6_GOTPC32_TLSDESC.
ld/
* testsuite/ld-x86-64/tlsbindesc.s: Add R_X86_64_CODE_6_GOTTPOFF
tests.
* testsuite/ld-x86-64/tlsbindesc.d: Updated.
* testsuite/ld-x86-64/tlsbindesc.rd: Likewise.
2024-02-08 03:45:43 -08:00
..
2021-03-19 17:58:32 -07:00
2021-03-19 17:58:32 -07:00
2019-02-19 16:13:24 -08:00
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2020-10-13 05:21:05 -07:00
2020-10-13 05:21:05 -07:00
2020-10-13 05:21:05 -07:00
2018-06-22 09:52:00 -07:00
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2021-01-17 16:43:59 -08:00
2024-01-04 22:58:12 +10:30
2021-01-17 16:43:59 -08:00
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2023-12-28 08:47:17 -08:00
2024-01-05 13:00:11 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2020-05-01 10:06:31 -07:00
2024-01-04 22:58:12 +10:30
2022-08-04 17:37:32 -07:00
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2022-05-18 09:34:31 +02:00
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2017-11-28 09:00:44 -08:00
2024-01-04 22:58:12 +10:30
2018-04-02 19:07:04 -07:00
2018-04-02 19:07:04 -07:00
2024-01-04 22:58:12 +10:30
2018-04-02 19:07:04 -07:00
2018-04-02 19:07:04 -07:00
2024-01-04 22:58:12 +10:30
2020-11-29 05:55:35 -08:00
2020-11-29 05:55:35 -08:00
2020-11-29 05:55:35 -08:00
2020-11-29 05:55:35 -08:00
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2020-12-14 15:49:27 -08:00
2020-12-14 15:49:27 -08:00
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2018-06-20 01:25:04 -07:00
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2018-04-24 13:51:24 -07:00
2018-04-24 13:51:24 -07:00
2018-04-24 13:51:24 -07:00
2018-04-24 13:51:24 -07:00
2024-01-04 22:58:12 +10:30
2018-07-14 12:29:50 -07:00
2018-07-14 12:29:50 -07:00
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2018-06-21 13:54:16 -07:00
2018-06-21 13:54:16 -07:00
2018-06-21 13:54:16 -07:00
2018-06-21 13:54:16 -07:00
2018-06-21 13:54:16 -07:00
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30
2023-12-28 08:47:17 -08:00
2024-01-04 22:58:12 +10:30
2024-02-08 03:45:43 -08:00
2024-02-08 03:45:43 -08:00
2024-01-04 22:58:12 +10:30
2023-12-28 08:47:17 -08:00
2023-12-28 08:47:17 -08:00
2023-12-28 08:47:17 -08:00
2023-12-28 08:47:17 -08:00
2023-12-28 08:47:17 -08:00
2024-01-04 22:58:12 +10:30
2024-01-04 22:58:12 +10:30