Don't rebuild partial packages purely because of their inittask if the inittask wasn't found in the host binary - it was probably eliminated due to being a no-op.
Improve firstmodule type registration by including unexported types (reflect.Type.Name() returns an empty string if TFlagNamed is not set, which is now the case for unexported types)
Only mark firstmodule types as unresolved symbols if their unreachable methods need to be reachable in JIT code (avoids rebuilding of more packages than needed)
Fixes:
reflect.Type.Name()
returns an empty string ifTFlagNamed
is not set, which is now the case for unexported types)go:info.runtime.pinnedTypemaps: relocation target go:info.[]map[github.com/eh-steve/goloader.typeOff]*github.com/eh-steve/goloader._type not defined
Cherrypicks: https://github.com/pkujhd/goloader/commit/ac978559ec27d6d6263b44b386529d6b341edac3 https://github.com/pkujhd/goloader/commit/22941f182d17e878e5af00a9807005587c1c1aaa https://github.com/pkujhd/goloader/commit/2fbc174bb76f8291bc8fa02ca918714ca3be328f