HOSTOBJ and UNDEFEXT symbols are actually not defined in the
current translation unit. So put them as undefined symbols, along
with DYNIMPORT.
For #61229.
Change-Id: I1112ca928cdc401bac45adaa3f88b19422813960
Reviewed-on: https://go-review.googlesource.com/c/go/+/503539
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
}
func symkind(ldr *loader.Loader, s loader.Sym) int {
- if ldr.SymType(s) == sym.SDYNIMPORT {
+ if t := ldr.SymType(s); t == sym.SDYNIMPORT || t == sym.SHOSTOBJ || t == sym.SUNDEFEXT {
return SymKindUndef
}
if ldr.AttrCgoExport(s) {