diff options
| author | Meng Zhuo <mengzhuo1203@gmail.com> | 2024-09-12 20:03:59 +0800 |
|---|---|---|
| committer | Meng Zhuo <mengzhuo@iscas.ac.cn> | 2025-02-13 19:04:13 -0800 |
| commit | 371ee1469cf30ecdbc8d1b55cf307a310ff3d630 (patch) | |
| tree | 79810d3af5613304c5260d7d140930a6ae7b625b /src/testing/testing.go | |
| parent | 5ff7a634e19a3e8e8a24bbdb948de19695234943 (diff) | |
| download | go-371ee1469cf30ecdbc8d1b55cf307a310ff3d630.tar.xz | |
cmd/link,cmd/internal: add R_GOT_PCREL_ITYPE_RELOC for riscv64
This CL adds new relocation type for riscv64: R_GOT_PCREL_ITYPE_RELOC
which generate an AUIPC + I-type pair with relocation type of GOT_HI20
and PCREL_LO12_I.
According to RISCV elf psabi doc, medium position independent code
model, the GNU as example is:
```
# Calculate address of non-local symbol
.Ltmp3: aupipc a0, %got_pcrel_hi(symbol)
ld a0, %pcrel_lo(.Ltmp3)(a0)
```
Change-Id: I719dd05e009ca2d9291f0689b346c059f9c56918
Reviewed-on: https://go-review.googlesource.com/c/go/+/612635
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/testing/testing.go')
0 files changed, 0 insertions, 0 deletions
