You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
garble/testdata/scripts
Daniel Martí c9deff810b
obfuscate fewer std packages (#196)
Previously, we were never obfuscating runtime and its direct
dependencies. Unfortunately, due to linkname, the runtime package is
actually closely related to dozens of other std packages as well.

Until we can obfuscate the runtime and properly support go:linkname
directives, obfuscating fewer std packages is a better outcome than
breaking and not producing any obfuscated code at all.

The added test case is building runtime/pprof, which used to cause
failures:

	# runtime/pprof
	/go/src/runtime/pprof/label.go:27:21: undefined: context.Context
	/go/src/runtime/pprof/label.go:59:21: undefined: context.Context
	/go/src/runtime/pprof/label.go:93:16: undefined: context.Context
	/go/src/runtime/pprof/label.go:101:20: undefined: context.Context

The net package was also very close to obfuscating properly thanks to
this change, so its test is now run as well. The only other remaining
fix was to not obfuscate fields on cgo types, since those aren't
obfuscated at the moment.

The map is pretty long, but it's only a temporary solution and the
command to obtain the list again is included. Never obfuscating the
entire std library is also an option, but it's a bit unnecessary.

Fixes #134.
5 years ago
..
asm.txt testdata: don't let tests rely on rewriting mod files 5 years ago
basic.txt Share data between processes via a shared file. (#192) 5 years ago
cgo.txt testdata: don't let tests rely on rewriting mod files 5 years ago
debugdir.txt testdata: don't let tests rely on rewriting mod files 5 years ago
goprivate.txt obfuscate fewer std packages (#196) 5 years ago
goversion.txt add test for Go version checking (#140) 5 years ago
help.txt Share data between processes via a shared file. (#192) 5 years ago
implement.txt testdata: don't let tests rely on rewriting mod files 5 years ago
imports.txt testdata: don't let tests rely on rewriting mod files 5 years ago
init.txt testdata: don't let tests rely on rewriting mod files 5 years ago
ldflags.txt testdata: don't let tests rely on rewriting mod files 5 years ago
literals.txt testdata: don't let tests rely on rewriting mod files 5 years ago
modinfo.txt testdata: don't let tests rely on rewriting mod files 5 years ago
plugin.txt testdata: don't let tests rely on rewriting mod files 5 years ago
seed.txt testdata: don't let tests rely on rewriting mod files 5 years ago
syntax.txt testdata: don't let tests rely on rewriting mod files 5 years ago
test.txt testdata: don't let tests rely on rewriting mod files 5 years ago
tiny.txt testdata: don't let tests rely on rewriting mod files 5 years ago