mirror of
https://github.com/golang/go
synced 2024-11-23 22:30:05 -07:00
[dev.link] cmd/link: remove symbol movement workaround in dodata
It is supposed to work around symbol movement in machosymorder. But machosymorder doesn't actually move symbols around. Change-Id: Ibdc2ad41aaa8cd49e865088aa1ddb7ab399736cd Reviewed-on: https://go-review.googlesource.com/c/go/+/230279 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Jeremy Faller <jeremy@golang.org>
This commit is contained in:
parent
f8b74eafd5
commit
26d6d07785
@ -1893,18 +1893,6 @@ func (state *dodataState) allocateDwarfSections2(ctxt *Link) {
|
||||
}
|
||||
|
||||
func (state *dodataState) dodataSect2(ctxt *Link, symn sym.SymKind, syms []loader.Sym) (result []loader.Sym, maxAlign int32) {
|
||||
if ctxt.HeadType == objabi.Hdarwin {
|
||||
// Some symbols may no longer belong in syms
|
||||
// due to movement in machosymorder.
|
||||
newSyms := make([]loader.Sym, 0, len(syms))
|
||||
for _, s := range syms {
|
||||
if state.symType(s) == symn {
|
||||
newSyms = append(newSyms, s)
|
||||
}
|
||||
}
|
||||
syms = newSyms
|
||||
}
|
||||
|
||||
var head, tail loader.Sym
|
||||
ldr := ctxt.loader
|
||||
for _, s := range syms {
|
||||
|
Loading…
Reference in New Issue
Block a user