[all-commits] [llvm/llvm-project] 6cfa40: [RISCV][lld] Set the type of TLSDESC relocation's ...
Paul Kirth via All-commits
all-commits at lists.llvm.org
Mon May 13 18:09:07 PDT 2024
Branch: refs/heads/release/18.x
Home: https://github.com/llvm/llvm-project
Commit: 6cfa40e450cfe7980a0c4aa0e17a8367b89f8d39
https://github.com/llvm/llvm-project/commit/6cfa40e450cfe7980a0c4aa0e17a8367b89f8d39
Author: Paul Kirth <paulkirth at google.com>
Date: 2024-05-13 (Mon, 13 May 2024)
Changed paths:
M lld/ELF/Relocations.cpp
M lld/test/ELF/riscv-tlsdesc-relax.s
M lld/test/ELF/riscv-tlsdesc.s
M llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp
Log Message:
-----------
[RISCV][lld] Set the type of TLSDESC relocation's referenced local symbol to STT_NOTYPE
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 symbol types.
Reviewers: topperc, MaskRay
Reviewed By: MaskRay
Pull Request: https://github.com/llvm/llvm-project/pull/85817
(cherry picked from commit dfe4ca9b7f4a422500d78280dc5eefd1979939e6)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list