mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.link] cmd/link: parallelize ELF relocation writing
Now that we write ELF relocation records in mapped memory with known sizes and offsets, we can write them in parallel. Further speed up Asmb2 pass. Linking cmd/compile with external linking, Asmb2 141ms ± 4% 97ms ± 5% -30.98% (p=0.000 n=10+9) Change-Id: I52c2b9230e90ed4421c21d7ef13a4f1e996f6054 Reviewed-on: https://go-review.googlesource.com/c/go/+/240400 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
parent
987ce93824
commit
36939aef77
11 changed files with 169 additions and 140 deletions
|
|
@ -236,7 +236,7 @@ type Arch struct {
|
|||
Asmb func(*Link, *loader.Loader)
|
||||
Asmb2 func(*Link, *loader.Loader)
|
||||
|
||||
Elfreloc1 func(*Link, *loader.Loader, loader.Sym, loader.ExtRelocView, int64) bool
|
||||
Elfreloc1 func(*Link, *OutBuf, *loader.Loader, loader.Sym, loader.ExtRelocView, int64) bool
|
||||
ElfrelocSize uint32 // size of an ELF relocation record, must match Elfreloc1. Currently this can be 0, meaning that the size is not fixed (a Go reloc may turn into multiple ELF reloc).
|
||||
Elfsetupplt func(ctxt *Link, plt, gotplt *loader.SymbolBuilder, dynamic loader.Sym)
|
||||
Gentext func(*Link, *loader.Loader)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue