Skip to content

Commit 130ede0

Browse files
committed
[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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Jeremy Faller <[email protected]>
1 parent 1e93812 commit 130ede0

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/cmd/link/internal/ld/data.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -878,12 +878,6 @@ func writeBlocks(ctxt *Link, out *OutBuf, sem chan int, ldr *loader.Loader, syms
878878
}
879879

880880
func writeBlock(ctxt *Link, out *OutBuf, ldr *loader.Loader, syms []loader.Sym, addr, size int64, pad []byte) {
881-
for i, s := range syms {
882-
if ldr.SymValue(s) >= addr && !ldr.AttrSubSymbol(s) {
883-
syms = syms[i:]
884-
break
885-
}
886-
}
887881

888882
st := ctxt.makeRelocSymState()
889883

0 commit comments

Comments
 (0)