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/55310
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
}
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 */
}