]> Cypherpunks repositories - gostls13.git/commit
debug/elf: add riscv attributes definitions
authorMeng Zhuo <mengzhuo@iscas.ac.cn>
Thu, 13 Mar 2025 08:29:16 +0000 (16:29 +0800)
committerGopher Robot <gobot@golang.org>
Fri, 14 Mar 2025 22:08:23 +0000 (15:08 -0700)
commit5bb73e650496c229c9baf5b9a4fe3861c07c9302
treec53f6ce18a9b8cc86a7147e97afa7259be1c507f
parent853b514417dab2cf0383e48207caff2ce0305618
debug/elf: add riscv attributes definitions

This CL adds `riscv.attributes` related ELF section header
type and program header type according to
[RISC-V ELF Specification](https://github.com/riscv-non-isa/riscv-elf-psabi-doc/releases/download/v1.0/riscv-abi.pdf)

Also an riscv64/linux testcase binary built from:

```
gcc -march=rv64g -no-pie -o gcc-riscv64-linux-exec hello.c
strip gcc-riscv64-linux-exec
```

Fixes #72843

Change-Id: I7710a0516f69141c0efaba71dd997f05b4c88421
Reviewed-on: https://go-review.googlesource.com/c/go/+/657515
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
api/next/72843.txt [new file with mode: 0644]
doc/next/6-stdlib/99-minor/debug/elf/72843.md [new file with mode: 0644]
src/debug/elf/elf.go
src/debug/elf/file_test.go
src/debug/elf/testdata/gcc-riscv64-linux-exec [new file with mode: 0644]