diff options
author | Josh Bleecher Snyder <josharian@gmail.com> | 2014-09-15 18:16:45 -0700 |
---|---|---|
committer | Josh Bleecher Snyder <josharian@gmail.com> | 2014-09-15 18:16:45 -0700 |
commit | c3dbf56a14e8d9dffab7330c203a82a66cf9722e (patch) | |
tree | 5912bfb73d51c830b946758692a3d71e8d00da6e /test/linkx.go | |
parent | 2bb0a5e085bda1812b7be711335fc43baf1af52e (diff) | |
download | go-c3dbf56a14e8d9dffab7330c203a82a66cf9722e.tar.gz go-c3dbf56a14e8d9dffab7330c203a82a66cf9722e.zip |
cmd/ld: document that -X overwrites initialized variables
Fixes #7626.
LGTM=iant
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/144870045
Diffstat (limited to 'test/linkx.go')
-rw-r--r-- | test/linkx.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/linkx.go b/test/linkx.go index 12d446ffc1..36d16aec9b 100644 --- a/test/linkx.go +++ b/test/linkx.go @@ -1,4 +1,4 @@ -// $G $D/$F.go && $L -X main.tbd hello $F.$A && ./$A.out +// $G $D/$F.go && $L -X main.tbd hello -X main.overwrite trumped $F.$A && ./$A.out // NOTE: This test is not run by 'run.go' and so not run by all.bash. // To run this test you must use the ./run shell script. @@ -12,9 +12,13 @@ package main var tbd string +var overwrite string = "dibs" func main() { if tbd != "hello" { - println("BUG: test/linkx", len(tbd), tbd) + println("BUG: test/linkx tbd", len(tbd), tbd) + } + if overwrite != "trumped" { + println("BUG: test/linkx overwrite", len(overwrite), overwrite) } } |