5 Commits

Author SHA1 Message Date
Paul Kirth
d95f7c9cab
[RISCV] Use the thread local stack protector for Android targets (#87672)
Android supports per thread stack protectors that are individually
managed and
initialized, which can provide stronger protections than using the
global stack
protector cookie. This patch matches the convention for other
architectures
targeting Android platforms.
2024-05-13 08:52:59 -07:00
Paul Kirth
60535229dd
[RISCV] Precommit stack protector checks for Linux and Android (#87679)
Upcoming patches will add TP relative stack checks for Android, and
Linux currently uses the default GOT based stack protector.
2024-04-22 09:01:32 -07:00
Fangrui Song
eabaee0c59
[RISCV] Omit "@plt" in assembly output "call foo@plt" (#72467)
R_RISCV_CALL/R_RISCV_CALL_PLT distinction is not necessary and
R_RISCV_CALL has been deprecated. Since https://reviews.llvm.org/D132530
`call foo` assembles to R_RISCV_CALL_PLT. The `@plt` suffix is not
useful and can be removed now (matching AArch64 and PowerPC).

GNU assembler assembles `call foo` to RISCV_CALL_PLT since 2022-09
(70f35d72ef04cd23771875c1661c9975044a749c).

Without this patch, unconditionally changing MO_CALL to MO_PLT could
create `jump .L1@plt, a0`, which is invalid in LLVM integrated assembler
and GNU assembler.
2024-01-07 12:09:44 -08:00
Roland McGrath
2406f3bea5 [RISCV] Clean up stack-protector-target test
Add some missed polish from https://reviews.llvm.org/D143355.

Reviewed By: jrtc27

Differential Revision: https://reviews.llvm.org/D143360
2023-02-06 16:42:59 -08:00
Roland McGrath
34b21e817f [RISCV] Use OS-specific stack-guard ABI for Fuchsia
Fuchsia provides a slot relative to tp for the stack-guard value,
which is cheaper to materialize than the default GOT load.

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D143353
2023-02-05 18:45:59 -08:00