mirror of
https://github.com/golang/go
synced 2024-11-23 18:00:06 -07:00
cmd/link: don't overwrite text sections on PPC64
The code writes text sections twice, one with Codeblk, one with Datblk. The second write shouldn't be there. May fix #38898. Change-Id: I4ec70294059ec9aa0fc4cc69a3cd824f5843287b Reviewed-on: https://go-review.googlesource.com/c/go/+/232661 Run-TryBot: Cherry Zhang <cherryyz@google.com> Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com> Reviewed-by: Jeremy Faller <jeremy@golang.org>
This commit is contained in:
parent
176481990f
commit
66ee97590c
@ -1098,11 +1098,6 @@ func asmb(ctxt *ld.Link, _ *loader.Loader) {
|
||||
}
|
||||
}
|
||||
|
||||
for _, sect := range ld.Segtext.Sections[1:] {
|
||||
offset := sect.Vaddr - ld.Segtext.Vaddr + ld.Segtext.Fileoff
|
||||
ld.WriteParallel(&wg, ld.Datblk, ctxt, offset, sect.Vaddr, sect.Length)
|
||||
}
|
||||
|
||||
if ld.Segrodata.Filelen > 0 {
|
||||
ld.WriteParallel(&wg, ld.Datblk, ctxt, ld.Segrodata.Fileoff, ld.Segrodata.Vaddr, ld.Segrodata.Filelen)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user