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í 99887c13c2 ignore -ldflags=-X flags mentioning unknown packages
That would panic, since the *listedPackage would be nil for a package
path we aren't aware of:

	panic: runtime error: invalid memory address or nil pointer dereference
	[signal SIGSEGV: segmentation violation code=0x1 addr=0x88 pc=0x126b57d]

	goroutine 1 [running]:
	main.transformLink.func1(0x7ffeefbff28b, 0x5d)
		mvdan.cc/garble@v0.0.0-20210302140807-b03cd08c0946/main.go:1260 +0x17d
	main.flagValueIter(0xc0000a8e20, 0x2f, 0x2f, 0x12e278e, 0x2, 0xc000129e28)
		mvdan.cc/garble@v0.0.0-20210302140807-b03cd08c0946/main.go:1410 +0x1e9
	main.transformLink(0xc0000a8e20, 0x30, 0x36, 0x4, 0xc000114648, 0x23, 0x12dfd60, 0x0)
		mvdan.cc/garble@v0.0.0-20210302140807-b03cd08c0946/main.go:1241 +0x1b9
	main.mainErr(0xc0000a8e10, 0x31, 0x37, 0x37, 0x0)
		mvdan.cc/garble@v0.0.0-20210302140807-b03cd08c0946/main.go:287 +0x389
	main.main1(0xc000096058)
		mvdan.cc/garble@v0.0.0-20210302140807-b03cd08c0946/main.go:150 +0xe7
	main.main()
		mvdan.cc/garble@v0.0.0-20210302140807-b03cd08c0946/main.go:83 +0x25

The linker ignores such unknown references, so we should too.

Fixes #259.
5 years ago
..
asm.txt replace the -p path when assembling (#247) 5 years ago
basic.txt obfuscate unexported names like exported ones (#227) 5 years ago
cgo.txt testdata: don't let tests rely on rewriting mod files 5 years ago
debugdir.txt reimplement import path obfuscation without goobj2 (#242) 5 years ago
goprivate.txt update the list of runtime-related packages for 1.16 (#246) 5 years ago
goversion.txt formally add support for Go 1.16 5 years ago
help.txt include a "garble version" test (#221) 5 years ago
implement.txt testdata: don't let tests rely on rewriting mod files 5 years ago
imports.txt properly fix obfuscated imports with their package names (#245) 5 years ago
init.txt testdata: add test case for init funcs in many files (#208) 5 years ago
ldflags.txt ignore -ldflags=-X flags mentioning unknown packages 5 years ago
linkname.txt fixed some bugs related to additional linkname corner cases (#210) 5 years ago
literals.txt Literals: Skip constants with inferred values. 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
position.txt simplify, improve, and test line obfuscation (#239) 5 years ago
reverse.txt reverse: support unexported names and package paths (#233) 5 years ago
seed.txt testdata: don't let tests rely on rewriting mod files 5 years ago
syntax.txt avoid panic on funcs that almost look like tests (#235) 5 years ago
test.txt reimplement import path obfuscation without goobj2 (#242) 5 years ago
tiny.txt testdata: fix flakiness of tiny.txt on Windows (#252) 5 years ago