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í 24d5ff362c fix a regression involving imported linkname funcs
In ce2c45440a, we simplified the code a bit and removed one call to
obfuscatedTypesPackage.

Unfortunately, we introduced a regression; if an exported function is
linknamed to another symbol name, and it's called from an importer
package, we would have a build failure now:

	> garble build
	[stderr]
	# test/main
	ZiOACuw7.go:1: undefined: ODC0xN52.BaDqbhkj

This is because the imported package would not hash the original name,
via its ignoreObjects logic. And, since the importer package has no
access to that knowledge, it would hash the same name, and fail to find
it in the final build.

The regression happened because we used to have a types.Scope Lookup
that saved us in this scenario. Add the test, and re-add the Lookup,
this time only for this particular scenario with function names.

Thanks to Andrew LeFevre for reporting and describing the test case.

While at it, replace more uses of "garbled" to "obfuscated".
5 years ago
..
asm.txt obfuscate asm function names as well (#273) 5 years ago
basic.txt testdata: reduce the cost of short tests 5 years ago
cgo.txt all: drop support for Go 1.15.x (#265) 5 years ago
debugdir.txt refactor "current package" with TOOLEXEC_IMPORTPATH (#266) 5 years ago
embed.txt don't obfuscate the "embed" import path 5 years ago
goprivate.txt obfuscate asm function names as well (#273) 5 years ago
goversion.txt CI: pin a commit when testing against Go tip 5 years ago
help.txt make "help" refuse arguments for now 5 years ago
implement.txt all: drop support for Go 1.15.x (#265) 5 years ago
imports.txt all: drop support for Go 1.15.x (#265) 5 years ago
init.txt all: drop support for Go 1.15.x (#265) 5 years ago
ldflags.txt testdata: remove some unnecessary execs (#267) 5 years ago
linkname.txt fix a regression involving imported linkname funcs 5 years ago
literals.txt make -literals succeed on all of std 5 years ago
modinfo.txt testdata: remove some unnecessary execs (#267) 5 years ago
plugin.txt all: drop support for Go 1.15.x (#265) 5 years ago
position.txt improve "reverse" even further (#289) 5 years ago
reverse.txt testdata: reduce the cost of short tests 5 years ago
seed.txt make flags like -literals and GOPRIVATE affect hashing (#288) 5 years ago
syntax.txt all: drop support for Go 1.15.x (#265) 5 years ago
test.txt testdata: reduce the cost of short tests 5 years ago
tiny.txt use hashWith for obfuscation position information 5 years ago