avoid go:linkname warnings when building on tip
Packages like os and sync have started using go:linknames pointing to packages outside their dependency tree, much like runtime already did. This started causing warnings to be printed while obfuscsating std: > exec garble build -o=out_rebuild ./stdimporter [stderr] # sync //go:linkname refers to syscall.hasWaitingReaders - add `import _ "syscall"` for garble to find the package # os //go:linkname refers to net.newUnixFile - add `import _ "net"` for garble to find the package > bincmp out_rebuild out PASS Relax the restriction in listPackage so that any package in std is now allowed to list packages in runtimeLinknamed, which makes the warnings and any potential problems go away. Also make these std test cases check that no warnings are printed, since I only happened to notice this problem by chance.pull/755/head
parent
0f2b59d794
commit
da5ddfa45d
Loading…
Reference in New Issue