From 1152615d208060afd4b6c492cc2abb8a989a8c9b Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Sat, 18 Feb 2023 16:41:25 +1100 Subject: debug/elf,cmd/link: add additional MIPS64 relocation type Add R_MIPS_PC32 which is a 32 bit PC relative relocation. These are produced by LLVM on mips64. Fixes #61974 Change-Id: I7b6c6848e40249e6d5ea474ea53c9d7e3ab23f88 Reviewed-on: https://go-review.googlesource.com/c/go/+/469395 Reviewed-by: Matthew Dempsky Run-TryBot: Joel Sing Reviewed-by: Junxian Zhu Reviewed-by: Cherry Mui TryBot-Result: Gopher Robot --- src/debug/elf/elf.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/debug') diff --git a/src/debug/elf/elf.go b/src/debug/elf/elf.go index c982c684ba..35b0e3bc83 100644 --- a/src/debug/elf/elf.go +++ b/src/debug/elf/elf.go @@ -2216,6 +2216,8 @@ const ( R_MIPS_TLS_TPREL64 R_MIPS = 48 /* TP-relative offset, 64 bit */ R_MIPS_TLS_TPREL_HI16 R_MIPS = 49 /* TP-relative offset, high 16 bits */ R_MIPS_TLS_TPREL_LO16 R_MIPS = 50 /* TP-relative offset, low 16 bits */ + + R_MIPS_PC32 R_MIPS = 248 /* 32 bit PC relative reference */ ) var rmipsStrings = []intName{ @@ -2267,6 +2269,7 @@ var rmipsStrings = []intName{ {48, "R_MIPS_TLS_TPREL64"}, {49, "R_MIPS_TLS_TPREL_HI16"}, {50, "R_MIPS_TLS_TPREL_LO16"}, + {248, "R_MIPS_PC32"}, } func (i R_MIPS) String() string { return stringName(uint32(i), rmipsStrings, false) } -- cgit v1.3-5-g9baa