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

1 view
Skip to first unread message

Meidan Li (Gerrit)

unread,
Mar 17, 2026, 10:41:15 PM (15 hours ago) Mar 17
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Meidan Li has uploaded the change for review

Commit message

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

Change diff

diff --git a/src/cmd/link/internal/loong64/asm.go b/src/cmd/link/internal/loong64/asm.go
index 9881e37..6bee95d 100644
--- a/src/cmd/link/internal/loong64/asm.go
+++ b/src/cmd/link/internal/loong64/asm.go
@@ -509,10 +509,6 @@
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:
pc := ldr.SymValue(s) + int64(r.Off())

Change information

Files:
  • M src/cmd/link/internal/loong64/asm.go
Change size: XS
Delta: 1 file changed, 0 insertions(+), 4 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ibf29af1a8b45c0ce4c40061524f9f7dda4edfff3
Gerrit-Change-Number: 756280
Gerrit-PatchSet: 1
Gerrit-Owner: Meidan Li <lime...@loongson.cn>
unsatisfied_requirement
satisfied_requirement
open
diffy

abner chenc (Gerrit)

unread,
3:47 AM (10 hours ago) 3:47 AM
to Meidan Li, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
Attention needed from Meidan Li

abner chenc voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Meidan Li
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ibf29af1a8b45c0ce4c40061524f9f7dda4edfff3
Gerrit-Change-Number: 756280
Gerrit-PatchSet: 1
Gerrit-Owner: Meidan Li <lime...@loongson.cn>
Gerrit-Reviewer: abner chenc <chen...@loongson.cn>
Gerrit-Attention: Meidan Li <lime...@loongson.cn>
Gerrit-Comment-Date: Wed, 18 Mar 2026 07:46:52 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
satisfied_requirement
open
diffy

abner chenc (Gerrit)

unread,
3:49 AM (10 hours ago) 3:49 AM
to Meidan Li, goph...@pubsubhelper.golang.org, Go LUCI, golang-co...@googlegroups.com
Attention needed from Meidan Li

abner chenc voted Code-Review+2

Code-Review+2
Open in Gerrit

Related details

Attention is currently required from:
  • Meidan Li
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ibf29af1a8b45c0ce4c40061524f9f7dda4edfff3
Gerrit-Change-Number: 756280
Gerrit-PatchSet: 1
Gerrit-Owner: Meidan Li <lime...@loongson.cn>
Gerrit-Reviewer: abner chenc <chen...@loongson.cn>
Gerrit-Attention: Meidan Li <lime...@loongson.cn>
Gerrit-Comment-Date: Wed, 18 Mar 2026 07:49:36 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages