Skip to content

Commit f64c0b2

Browse files
committed
debug/elf: add R_RISCV_32_PCREL relocation
This were missed in CL 107339 as it is not documented (yet) in https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md But binutils already uses it. See riscv-non-isa/riscv-elf-psabi-doc#36 Change-Id: I1b084cbf70eb6ac966136bed1bb654883a97b6a9 Reviewed-on: https://go-review.googlesource.com/134015 Run-TryBot: Tobias Klauser <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 73b8e5f commit f64c0b2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/debug/elf/elf.go

+2
Original file line numberDiff line numberDiff line change
@@ -2424,6 +2424,7 @@ const (
24242424
R_RISCV_SET8 R_RISCV = 54 /* Local label subtraction */
24252425
R_RISCV_SET16 R_RISCV = 55 /* Local label subtraction */
24262426
R_RISCV_SET32 R_RISCV = 56 /* Local label subtraction */
2427+
R_RISCV_32_PCREL R_RISCV = 57 /* 32-bit PC relative */
24272428
)
24282429

24292430
var rriscvStrings = []intName{
@@ -2480,6 +2481,7 @@ var rriscvStrings = []intName{
24802481
{54, "R_RISCV_SET8"},
24812482
{55, "R_RISCV_SET16"},
24822483
{56, "R_RISCV_SET32"},
2484+
{57, "R_RISCV_32_PCREL"},
24832485
}
24842486

24852487
func (i R_RISCV) String() string { return stringName(uint32(i), rriscvStrings, false) }

0 commit comments

Comments
 (0)