mirror of
https://git.musl-libc.org/git/musl
synced 2025-01-09 00:02:17 +03:00
01d9fe4d9f
These are mostly copied from riscv64. _Addr and _Reg had to become int to match compiler-controlled parts of the ABI (result type of sizeof, etc.). There is no kernel stat struct; the userspace stat matches glibc in the sizes and offsets of all fields (including glibc's __dev_t __pad1). The jump buffer is 12 words larger to account for 12 saved double-precision floats; additionally it should be 64-bit aligned to save doubles. The syscall list was significantly revised by deleting all time32 and pre-statx syscalls, and renaming several syscalls that have different names depending on __BITS_PER_LONG, notably mmap2 and _llseek. futex was added as an alias to futex_time64 since it is widely used by software which does not pass time arguments.
23 lines
663 B
C
23 lines
663 B
C
#if defined __riscv_float_abi_soft
|
|
#define RISCV_FP_SUFFIX "-sf"
|
|
#elif defined __riscv_float_abi_single
|
|
#define RISCV_FP_SUFFIX "-sp"
|
|
#elif defined __riscv_float_abi_double
|
|
#define RISCV_FP_SUFFIX ""
|
|
#endif
|
|
|
|
#define LDSO_ARCH "riscv32" RISCV_FP_SUFFIX
|
|
|
|
#define TPOFF_K 0
|
|
|
|
#define REL_SYMBOLIC R_RISCV_32
|
|
#define REL_PLT R_RISCV_JUMP_SLOT
|
|
#define REL_RELATIVE R_RISCV_RELATIVE
|
|
#define REL_COPY R_RISCV_COPY
|
|
#define REL_DTPMOD R_RISCV_TLS_DTPMOD32
|
|
#define REL_DTPOFF R_RISCV_TLS_DTPREL32
|
|
#define REL_TPOFF R_RISCV_TLS_TPREL32
|
|
|
|
#define CRTJMP(pc,sp) __asm__ __volatile__( \
|
|
"mv sp, %1 ; jr %0" : : "r"(pc), "r"(sp) : "memory" )
|