Feng Zou fad5ed6e90
[X86][LLD] Handle R_X86_64_CODE_4_GOTPC32_TLSDESC relocation type (#116909)
For

  lea name@tlsdesc(%rip), %reg

add

  R_X86_64_CODE_4_GOTPC32_TLSDESC = 45

in #116908.

Linker can treat R_X86_64_CODE_4_GOTPC32_TLSDESC as
R_X86_64_GOTPC32_TLSDESC or convert the instruction above to

  mov $name@tpoff, %reg

if the first byte of the instruction at the relocation offset - 4 is
0xd5 (namely, encoded w/REX2 prefix) when possible.

Binutils patch: a533c8df59
Binutils mailthread: https://sourceware.org/pipermail/binutils/2023-December/131463.html
ABI discussion: https://groups.google.com/g/x86-64-abi/c/ACwD-UQXVDs/m/vrgTenKyFwAJ
Blog: https://kanrobert.github.io/rfc/All-about-APX-relocation
2024-11-27 09:31:12 +08:00
..
2024-10-05 09:37:27 -07:00
2024-10-06 00:31:51 -07:00
2024-10-11 18:35:02 -07:00
2024-11-14 22:17:10 -08:00
2024-10-10 22:22:25 -07:00
2024-11-14 22:50:53 -08:00
2024-09-29 14:45:00 -07:00
2024-09-29 15:39:52 -07:00
2024-09-29 15:32:16 -07:00
2024-11-16 20:32:44 -08:00
2024-11-16 19:11:58 -08:00
2024-10-11 23:34:43 -07:00

See docs/NewLLD.rst