diff options
author | Jeremy Faller <jeremy@golang.org> | 2020-04-29 12:20:38 -0400 |
---|---|---|
committer | Jeremy Faller <jeremy@golang.org> | 2020-04-29 17:41:33 +0000 |
commit | 65c1805e77137c6165ea3ad49b8528fc08cef1ea (patch) | |
tree | 99be18bbb3cb8a4d128d585ba6df6d5563d51f5d /src/cmd/link/internal/ld/lib.go | |
parent | f886ff7b417739cf2269267e7b057a7cfdc85324 (diff) | |
download | go-65c1805e77137c6165ea3ad49b8528fc08cef1ea.tar.gz go-65c1805e77137c6165ea3ad49b8528fc08cef1ea.zip |
[dev.link] cmd/link: add loader.ExtReloc to Archreloc2
Non functional, but required by the majority of the architectures.
Change-Id: I57601016c28ce665a9d434e283a1db8bded9b133
Reviewed-on: https://go-review.googlesource.com/c/go/+/230858
Run-TryBot: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/cmd/link/internal/ld/lib.go')
-rw-r--r-- | src/cmd/link/internal/ld/lib.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go index baccb8baae..3b76f3a236 100644 --- a/src/cmd/link/internal/ld/lib.go +++ b/src/cmd/link/internal/ld/lib.go @@ -235,18 +235,18 @@ type Arch struct { Adddynrel func(*Target, *loader.Loader, *ArchSyms, *sym.Symbol, *sym.Reloc) bool Adddynrel2 func(*Target, *loader.Loader, *ArchSyms, loader.Sym, *loader.Reloc2, int) bool Archinit func(*Link) - // Archreloc is an arch-specific hook that assists in - // relocation processing (invoked by 'relocsym'); it handles - // target-specific relocation tasks. Here "rel" is the current - // relocation being examined, "sym" is the symbol containing the - // chunk of data to which the relocation applies, and "off" is the - // contents of the to-be-relocated data item (from sym.P). Return - // value is the appropriately relocated value (to be written back - // to the same spot in sym.P) and a boolean indicating - // success/failure (a failing value indicates a fatal error). + // Archreloc is an arch-specific hook that assists in relocation processing + // (invoked by 'relocsym'); it handles target-specific relocation tasks. + // Here "rel" is the current relocation being examined, "sym" is the symbol + // containing the chunk of data to which the relocation applies, and "off" + // is the contents of the to-be-relocated data item (from sym.P). Return + // value is the appropriately relocated value (to be written back to the + // same spot in sym.P), a boolean indicating if the external relocations' + // been used, and a boolean indicating success/failure (a failing value + // indicates a fatal error). Archreloc func(target *Target, syms *ArchSyms, rel *sym.Reloc, sym *sym.Symbol, offset int64) (relocatedOffset int64, success bool) - Archreloc2 func(*Target, *loader.Loader, *ArchSyms, *loader.Reloc2, loader.Sym, int64) (int64, bool) + Archreloc2 func(*Target, *loader.Loader, *ArchSyms, *loader.Reloc2, *loader.ExtReloc, loader.Sym, int64) (int64, bool, bool) // Archrelocvariant is a second arch-specific hook used for // relocation processing; it handles relocations where r.Type is // insufficient to describe the relocation (r.Variant != |