[dev.link] cmd/link: fix macho host objects

Small updates to macho loader, fixing some misunderstandings I had about
using the new object file format.

Change-Id: I9224b01ca327e3a087ebfa36800bd6eef6abcc80
Reviewed-on: https://go-review.googlesource.com/c/go/+/204097
Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
Jeremy Faller 2019-10-29 10:52:20 -04:00
parent 931845aee3
commit 396a9b98ba
4 changed files with 13 additions and 19 deletions

View file

@ -511,7 +511,7 @@ func (l *Loader) OuterSym(i Sym) Sym {
return 0
}
// SubSym gets sub symbols for a previously loaded host object symbol.
// SubSym gets the subsymbol for host object loaded symbols.
func (l *Loader) SubSym(i Sym) Sym {
sym := l.Syms[i]
if sym != nil && sym.Sub != nil {