mirror of https://github.com/golang/go.git
[dev.link] cmd/link: remove some unneeded code from writeBlock()
The loader writeBlock() function has code that tries to skip the initial portion of the input symbols list depending on the address of the section being written-- this code is dead (skipping is never triggered) due to similar skipping in the callers; remove this preamble. Change-Id: I9769694a3194faf73ebebbbc10ceba4928c3087c Reviewed-on: https://go-review.googlesource.com/c/go/+/241067 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
1e9381207e
commit
130ede0d9e
|
|
@ -878,12 +878,6 @@ func writeBlocks(ctxt *Link, out *OutBuf, sem chan int, ldr *loader.Loader, syms
|
|||
}
|
||||
|
||||
func writeBlock(ctxt *Link, out *OutBuf, ldr *loader.Loader, syms []loader.Sym, addr, size int64, pad []byte) {
|
||||
for i, s := range syms {
|
||||
if ldr.SymValue(s) >= addr && !ldr.AttrSubSymbol(s) {
|
||||
syms = syms[i:]
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
st := ctxt.makeRelocSymState()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue