aboutsummaryrefslogtreecommitdiff
path: root/test/linkx.go
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2019-10-09 10:22:20 -0400
committerCherry Zhang <cherryyz@google.com>2019-10-16 15:57:07 +0000
commit5caac2f73efe7fc6919f7850d99c35cde02012b5 (patch)
treed1aab7ddcf0096da6d15c53a2c54f01838d0858e /test/linkx.go
parentc9470b04833332a8e2287364ccfa3e690f5a2047 (diff)
downloadgo-5caac2f73efe7fc6919f7850d99c35cde02012b5.tar.gz
go-5caac2f73efe7fc6919f7850d99c35cde02012b5.zip
[dev.link] cmd: default to new object files
Switch the default to new object files. Internal linking cgo is disabled for now, as it does not work yet in newobj mode. Shared libraries are also broken. Disable some tests that are known broken for now. Change-Id: I8ca74793423861d607a2aa7b0d89a4f4d4ca7671 Reviewed-on: https://go-review.googlesource.com/c/go/+/200161 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jeremy Faller <jeremy@golang.org>
Diffstat (limited to 'test/linkx.go')
-rw-r--r--test/linkx.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/linkx.go b/test/linkx.go
index 520a065182..2b5b6edd47 100644
--- a/test/linkx.go
+++ b/test/linkx.go
@@ -29,4 +29,12 @@ func main() {
fmt.Println(overwrite)
fmt.Println(overwritecopy)
fmt.Println(arraycopy[1])
+
+ // Check non-string symbols are not overwritten.
+ // This also make them used.
+ // TODO: decide if we need to issue an error if -X
+ // is applied to a non-string unreachable symbol.
+ if b || x != 0 {
+ panic("b or x overwritten")
+ }
}