aboutsummaryrefslogtreecommitdiff
path: root/sys/riscv/riscv
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2021-06-29 07:49:04 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2021-06-29 07:49:12 +0000
commit435754a59ee203c3369f47ff9103f269c81581b7 (patch)
tree30f750128028c70ad9024b6f3362f7b38828fd83 /sys/riscv/riscv
parentd26ef5c7ac830812f07a02787f25fed5d6f8609e (diff)
downloadsrc-435754a59ee203c3369f47ff9103f269c81581b7.tar.gz
src-435754a59ee203c3369f47ff9103f269c81581b7.zip
Add infrastructure required for Linux coredump support
This adds `sv_elf_core_osabi`, `sv_elf_core_abi_vendor`, and `sv_elf_core_prepare_notes` fields to `struct sysentvec`, and modifies imgact_elf.c to make use of them instead of hardcoding FreeBSD-specific values. It also updates all of the ABI definitions to preserve current behaviour. This makes it possible to implement non-native ELF coredump support without unnecessary code duplication. It will be used for Linux coredumps. Reviewed By: kib Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30921
Diffstat (limited to 'sys/riscv/riscv')
-rw-r--r--sys/riscv/riscv/elf_machdep.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/riscv/riscv/elf_machdep.c b/sys/riscv/riscv/elf_machdep.c
index 06d117128ef7..ee80e04e8c31 100644
--- a/sys/riscv/riscv/elf_machdep.c
+++ b/sys/riscv/riscv/elf_machdep.c
@@ -72,6 +72,9 @@ struct sysentvec elf64_freebsd_sysvec = {
.sv_szsigcode = &szsigcode,
.sv_name = "FreeBSD ELF64",
.sv_coredump = __elfN(coredump),
+ .sv_elf_core_osabi = ELFOSABI_FREEBSD,
+ .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR,
+ .sv_elf_core_prepare_notes = __elfN(prepare_notes),
.sv_imgact_try = NULL,
.sv_minsigstksz = MINSIGSTKSZ,
.sv_minuser = VM_MIN_ADDRESS,