mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.link] cmd/link: use new sym builders in macho loader
Change-Id: Ia055559d1eb12736d0bdd5a30103cd4b9788d36e Reviewed-on: https://go-review.googlesource.com/c/go/+/215917 Run-TryBot: Jeremy Faller <jeremy@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
parent
2d2590e94a
commit
4ad94a5db9
4 changed files with 111 additions and 78 deletions
|
|
@ -457,7 +457,8 @@ func (ctxt *Link) loadlib() {
|
|||
}
|
||||
|
||||
// Process cgo directives (has to be done before host object loading).
|
||||
ctxt.loadcgodirectives(ctxt.IsELF && *FlagNewLdElf)
|
||||
newCgo := (ctxt.IsELF && *FlagNewLdElf) || ctxt.HeadType == objabi.Hdarwin
|
||||
ctxt.loadcgodirectives(newCgo)
|
||||
|
||||
// Conditionally load host objects, or setup for external linking.
|
||||
hostobjs(ctxt)
|
||||
|
|
@ -1888,7 +1889,7 @@ func ldobj(ctxt *Link, f *bio.Reader, lib *sym.Library, length int64, pn string,
|
|||
Errorf(nil, "%v", err)
|
||||
return
|
||||
}
|
||||
ctxt.Textp = append(ctxt.Textp, textp...)
|
||||
ctxt.Textp2 = append(ctxt.Textp2, textp...)
|
||||
}
|
||||
return ldhostobj(ldmacho, ctxt.HeadType, f, pkg, length, pn, file)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue