cmd/link/internal/loong64: remove the handling of R_CONST and R_GOTOFF from the internal linker

These two relocations are already handled in general code and do not require architecture-specific processing.

Change-Id: Ibf29af1a8b45c0ce4c40061524f9f7dda4edfff3
Reviewed-on: https://go-review.googlesource.com/c/go/+/756280
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: abner chenc <chenguoqi@loongson.cn>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This commit is contained in:
limeidan
2026-03-17 10:47:05 +08:00
committed by abner chenc
parent c60392da8b
commit cfb67d0871

View File

@@ -563,12 +563,6 @@ func archreloc(target *ld.Target, ldr *loader.Loader, syms *ld.ArchSyms, r loade
const noExtReloc = 0
switch r.Type() {
case objabi.R_CONST:
return r.Add(), noExtReloc, isOk
case objabi.R_GOTOFF:
return ldr.SymValue(r.Sym()) + r.Add() - ldr.SymValue(syms.GOT), noExtReloc, isOk
case objabi.R_LOONG64_ADDR_HI,
objabi.R_LOONG64_ADDR_LO,
objabi.R_LOONG64_ADDR64_HI,