[llvm-branch-commits] [lld] Fix handling of RISCV TLSDESC relocations (PR #85817)
Paul Kirth via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Mar 19 09:42:45 PDT 2024
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/85817
When adding fixups for RISCV_TLSDESC_ADD_LO and RISCV_TLSDESC_LOAD_LO,
the local label added for RISCV TLSDESC relocations have STT_TLS set,
which is incorrect. Instead, these labels should have `STT_NOTYPE`.
This patch stops adding such fixups and avoid setting the STT_TLS on
these symbols. Failing to do so can cause LLD to emit an error `has an
STT_TLS symbol but doesn't have an SHF_TLS section`. We additionally,
adjust how LLD services these relocations to avoid errors with
incompatible relocation and sybol types.
More information about the llvm-branch-commits
mailing list