RISC-V: Add support for dl_runtime_profile (BZ #31151)
commit6b32696116e0097f5dd578ec087bcbef483f2a07
authorAurelien Jarno <aurelien@aurel32.net>
Sat, 30 Dec 2023 10:00:10 +0000 (30 11:00 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Sat, 30 Dec 2023 10:00:10 +0000 (30 11:00 +0100)
treeffff362478f2dd820ecff33d8800334aff39b9e0
parenta8a4c94ae9cefeeba72ca41364fcf684a64477bc
RISC-V: Add support for dl_runtime_profile (BZ #31151)

Code is mostly inspired from the LoongArch one, which has a similar ABI,
with minor changes to support riscv32 and register differences.

This fixes elf/tst-sprof-basic. This also fixes elf/tst-audit1,
elf/tst-audit2 and elf/tst-audit8 with recent binutils snapshots when
--enable-bind-now is used.

Resolves: BZ #31151

Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
sysdeps/riscv/Makefile
sysdeps/riscv/dl-link.sym [new file with mode: 0644]
sysdeps/riscv/dl-machine.h
sysdeps/riscv/dl-trampoline.S