aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/link/testdata
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2020-06-18 18:05:10 -0400
committerCherry Zhang <cherryyz@google.com>2020-06-19 20:10:25 +0000
commitf2bba30e4068695fcb08ddf5006e776c1fd38eca (patch)
tree2de8eb3856171345e81e09207f4616ffc1bc0b73 /src/cmd/link/testdata
parent27a0012bd65a44429e78c19ec18ecf87640d8f45 (diff)
downloadgo-f2bba30e4068695fcb08ddf5006e776c1fd38eca.tar.xz
cmd/link: use sym.Symbol in addpersrc
addpersrc is called very late, after we have converted to sym.Symbols and various fields in loader representation have been dropped. Use the Symbol representation there. Fixes #39658. Change-Id: I616e838655b6f01554644171317e2cc5cefabf39 Reviewed-on: https://go-review.googlesource.com/c/go/+/238779 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Jeremy Faller <jeremy@golang.org>
Diffstat (limited to 'src/cmd/link/testdata')
-rw-r--r--src/cmd/link/testdata/testPErsrc/main.go19
-rw-r--r--src/cmd/link/testdata/testPErsrc/rsrc.sysobin0 -> 228 bytes
2 files changed, 19 insertions, 0 deletions
diff --git a/src/cmd/link/testdata/testPErsrc/main.go b/src/cmd/link/testdata/testPErsrc/main.go
new file mode 100644
index 0000000000..5eb66fb9cc
--- /dev/null
+++ b/src/cmd/link/testdata/testPErsrc/main.go
@@ -0,0 +1,19 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that a PE rsrc section is handled correctly (issue 39658).
+//
+// rsrc.syso is created with:
+// windres -i a.rc -o rsrc.syso -O coff
+// on windows-amd64-2016 builder, where a.rc is a text file with
+// the following content:
+//
+// resname RCDATA {
+// "Hello Gophers!\0",
+// "This is a test.\0",
+// }
+
+package main
+
+func main() {}
diff --git a/src/cmd/link/testdata/testPErsrc/rsrc.syso b/src/cmd/link/testdata/testPErsrc/rsrc.syso
new file mode 100644
index 0000000000..0d9699da04
--- /dev/null
+++ b/src/cmd/link/testdata/testPErsrc/rsrc.syso
Binary files differ