cmd/internal/obj, cmd/internal/ld, cmd/7l: external linking for darwin/arm64

Change-Id: I3b3f80791a1db4c2b7318f81a115972cd2237f02
Signed-off-by: Shenghou Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/8781
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Shenghou Ma 2015-04-10 21:28:09 -04:00 committed by Minux Ma
parent 909bdf56d6
commit 4fd9a3fdbb
7 changed files with 213 additions and 29 deletions

View file

@ -475,7 +475,7 @@ func loadlib() {
// dependency problems when compiling natively (external linking requires
// runtime/cgo, runtime/cgo requires cmd/cgo, but cmd/cgo needs to be
// compiled using external linking.)
if Thearch.Thechar == '5' && HEADTYPE == Hdarwin && iscgo {
if (Thearch.Thechar == '5' || Thearch.Thechar == '7') && HEADTYPE == Hdarwin && iscgo {
Linkmode = LinkExternal
}
}
@ -1599,6 +1599,7 @@ func genasmsym(put func(*LSym, string, int, int64, int64, int, *LSym)) {
STYPE,
SSTRING,
SGOSTRING,
SGOFUNC,
SWINDOWS:
if !s.Reachable {
continue