Commit 90ffc40e authored by Hiroshi Ioka's avatar Hiroshi Ioka Committed by Ian Lance Taylor

cmd/link: correct Mach-O file flag

Only set MH_NOUNDEFS if there are no undefined symbols.
Doesn't seem to matter, but may as well do it right.

Change-Id: I6c472e000578346c28cf0e10f24f870e3a0de628
Reviewed-on: https://go-review.googlesource.com/55310Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent f4abbc0e
......@@ -263,7 +263,11 @@ func machowrite() int {
}
Thearch.Lput(uint32(len(load)) + uint32(nseg) + uint32(ndebug))
Thearch.Lput(uint32(loadsize))
Thearch.Lput(MH_NOUNDEFS) /* flags - no undefines */
if nkind[SymKindUndef] == 0 {
Thearch.Lput(MH_NOUNDEFS) /* flags - no undefines */
} else {
Thearch.Lput(0) /* flags */
}
if macho64 {
Thearch.Lput(0) /* reserved */
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment