Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(634)

Unified Diff: src/cmd/link/testdata/layout.s

Issue 51260045: code review 51260045: cmd/link: implement and test automatic symbols (Closed)
Patch Set: diff -r 29156b17bdb7 https://code.google.com/p/go/ Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/cmd/link/testdata/layout.6 ('k') | src/cmd/link/write.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/link/testdata/layout.s
===================================================================
new file mode 100644
--- /dev/null
+++ b/src/cmd/link/testdata/layout.s
@@ -0,0 +1,29 @@
+// Copyright 2014 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 of section assignment in layout.go.
+// Each symbol should end up in the section named by the symbol name prefix (up to the underscore).
+
+#include "../../ld/textflag.h"
+
+TEXT text_start(SB),7,$0
+ MOVQ $rodata_sym(SB), AX
+ MOVQ $noptrdata_sym(SB), AX
+ MOVQ $data_sym(SB), AX
+ MOVQ $bss_sym(SB), AX
+ MOVQ $noptrbss_sym(SB), AX
+ RET
+
+DATA rodata_sym(SB)/4, $1
+GLOBL rodata_sym(SB), RODATA, $4
+
+DATA noptrdata_sym(SB)/4, $1
+GLOBL noptrdata_sym(SB), NOPTR, $4
+
+DATA data_sym(SB)/4, $1
+GLOBL data_sym(SB), $4
+
+GLOBL bss_sym(SB), $4
+
+GLOBL noptrbss_sym(SB), NOPTR, $4
« no previous file with comments | « src/cmd/link/testdata/layout.6 ('k') | src/cmd/link/write.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b