mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.link] cmd/link/internal/loader: speed up Loader.RelocVariant
Remove some extra sanity-checking code from the loader's RelocVariant method, since it was yielding a slowdown of 1-2% linking kubernetes hyperkube (once again a reminder that relocation processing is a very performance-sensitive part of the linker). Change-Id: Ifbc0662f3f96c5f54131103ce6f7439ecfb9b9dc Reviewed-on: https://go-review.googlesource.com/c/go/+/227477 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jeremy Faller <jeremy@golang.org>
This commit is contained in:
parent
c8d89ddb18
commit
9f6a35660d
1 changed files with 0 additions and 3 deletions
|
|
@ -2593,9 +2593,6 @@ func (l *Loader) SetRelocVariant(s Sym, ri int, v sym.RelocVariant) {
|
|||
// RelocVariant returns the 'variant' property of a relocation on
|
||||
// some specific symbol.
|
||||
func (l *Loader) RelocVariant(s Sym, ri int) sym.RelocVariant {
|
||||
if relocs := l.Relocs(s); ri >= relocs.Count() {
|
||||
panic("invalid relocation ID")
|
||||
}
|
||||
return l.relocVariant[relocId{s, ri}]
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue