RISC-V: ABI Implementation

System Internals / glibc - Palmer Dabbelt [dabbelt.com] - 29 January 2018 18:25 EST

This patch contains code that needs to directly know about the RISC-V ABI, which is specified in a work-in-progress psABI document:

https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md

This is meant to contain all the RISC-V code that needs to explicitly name registers or manage in-memory structure layout. This does not contain any of the Linux-specific code.

2018-01-29 Palmer Dabbelt

- sysdeps/riscv/__longjmp.S: New file.
- sysdeps/riscv/backtrace.c: Likewise.
- sysdeps/riscv/bits/endian.h: Likewise.
- sysdeps/riscv/bits/setjmp.h: Likewise.
- sysdeps/riscv/bits/wordsize.h: Likewise.
- sysdeps/riscv/bsd-_setjmp.c: Likewise.
- sysdeps/riscv/bsd-setjmp.c: Likewise.
- sysdeps/riscv/dl-trampoline.S: Likewise.
- sysdeps/riscv/gccframe.h: Likewise.
- sysdeps/riscv/jmpbuf-offsets.h: Likewise.
- sysdeps/riscv/jmpbuf-unwind.h: Likewise.
- sysdeps/riscv/machine-gmon.h: Likewise.
- sysdeps/riscv/memusage.h: Likewise.
- sysdeps/riscv/setjmp.S: Likewise.
- sysdeps/riscv/sys/asm.h: Likewise.
- sysdeps/riscv/tls-macros.h: Likewise.

c776fa113d RISC-V: ABI Implementation
ChangeLog | 16 ++
sysdeps/riscv/__longjmp.S | 57 ++++++++
sysdeps/riscv/backtrace.c | 1 +
sysdeps/riscv/bits/endian.h | 5 +
sysdeps/riscv/bits/link.h | 56 +++++++
sysdeps/riscv/bits/setjmp.h | 39 +++++
sysdeps/riscv/bits/wordsize.h | 29 ++++
sysdeps/riscv/bsd-_setjmp.c | 1 +
sysdeps/riscv/bsd-setjmp.c | 1 +
sysdeps/riscv/dl-machine.h | 323 +++++++++++++++++++++++++++++++++++++++++
sysdeps/riscv/dl-trampoline.S | 90 ++++++++++++
sysdeps/riscv/gccframe.h | 21 +++
sysdeps/riscv/jmpbuf-offsets.h | 23 +++
sysdeps/riscv/jmpbuf-unwind.h | 46 ++++++
sysdeps/riscv/ldsodefs.h | 47 ++++++
sysdeps/riscv/linkmap.h | 4 +
sysdeps/riscv/machine-gmon.h | 37 +++++
sysdeps/riscv/memusage.h | 21 +++
sysdeps/riscv/setjmp.S | 74 ++++++++++
sysdeps/riscv/sotruss-lib.c | 51 +++++++
sysdeps/riscv/start.S | 81 +++++++++++
sysdeps/riscv/sys/asm.h | 63 ++++++++
sysdeps/riscv/tls-macros.h | 61 ++++++++
sysdeps/riscv/tst-audit.h | 23 +++
24 files changed, 1170 insertions(+)

Upstream: sourceware.org


  • Share