diff options
| author | Russ Cox <rsc@golang.org> | 2024-11-05 13:33:17 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2024-11-07 12:17:10 +0000 |
| commit | 5b20eec8a0eb3bd4681e315c0c4023c5164ea7b9 (patch) | |
| tree | 184613d170d137337c65c238153caafe4ececa21 /src/debug/elf/testdata | |
| parent | 4ce8c0604ee1c36c221b1a3d767dfa131d5cce8c (diff) | |
| download | go-5b20eec8a0eb3bd4681e315c0c4023c5164ea7b9.tar.xz | |
cmd/internal/obj: replace obj.Addrel func with LSym.AddRel method
The old API was to do
r := obj.AddRel(sym)
r.Type = this
r.Off = that
etc
The new API is:
sym.AddRel(ctxt, obj.Reloc{Type: this: Off: that, etc})
This new API is more idiomatic and avoids ever having relocations
that are only partially constructed. Most importantly, it sets up
for sym.AddRel being able to check relocation validity in the future.
(Passing ctxt is for use in validity checking.)
Passes golang.org/x/tools/cmd/toolstash/buildall.
Change-Id: I042ea76e61bb3bf6402f98ca11291a13f4799972
Reviewed-on: https://go-review.googlesource.com/c/go/+/625616
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/debug/elf/testdata')
0 files changed, 0 insertions, 0 deletions
