glibc/sysdeps/riscv/dl-link.sym
Aurelien Jarno 6b32696116 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>
2023-12-30 11:00:10 +01:00

19 lines
628 B
Plaintext

#include <stddef.h>
#include <sysdep.h>
#include <link.h>
DL_SIZEOF_RG sizeof(struct La_riscv_regs)
DL_SIZEOF_RV sizeof(struct La_riscv_retval)
DL_OFFSET_RG_A0 offsetof(struct La_riscv_regs, lr_reg)
#ifndef __riscv_float_abi_soft
DL_OFFSET_RG_FA0 offsetof(struct La_riscv_regs, lr_fpreg)
#endif
DL_OFFSET_RG_RA offsetof(struct La_riscv_regs, lr_ra)
DL_OFFSET_RG_SP offsetof(struct La_riscv_regs, lr_sp)
DL_OFFSET_RV_A0 offsetof(struct La_riscv_retval, lrv_a0)
#ifndef __riscv_float_abi_soft
DL_OFFSET_RV_FA0 offsetof(struct La_riscv_retval, lrv_fa0)
#endif