summaryrefslogtreecommitdiff
path: root/src/cmd/link
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2014-08-12 17:04:45 -0700
committerRob Pike <r@golang.org>2014-08-12 17:04:45 -0700
commit02573c02d6a6f5f2fc291c18cbca0c6bfeea1ab9 (patch)
tree941cd76be82e2c18216d8003cee4dac29004e657 /src/cmd/link
parentc36198b3f166e5c266a690ae07e44b9c5ff5496c (diff)
downloadgo-02573c02d6a6f5f2fc291c18cbca0c6bfeea1ab9.tar.gz
all: copy cmd/ld/textflag.h into pkg/GOOS_GOARCH
The file is used by assembly code to define symbols like NOSPLIT. Having it hidden inside the cmd directory makes it hard to access outside the standard repository. Solution: As with a couple of other files used by cgo, copy the file into the pkg directory and add a -I argument to the assembler to access it. Thus one can write just #include "textflag.h" in .s files. The names in runtime are not updated because in the boot sequence the file has not been copied yet when runtime is built. All other .s files in the repository are updated. Changes to doc/asm.html, src/cmd/dist/build.c, and src/cmd/go/build.go are hand-made. The rest are just the renaming done by a global substitution. (Yay sam). LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/128050043
Diffstat (limited to 'src/cmd/link')
-rw-r--r--src/cmd/link/testdata/autosection.s2
-rw-r--r--src/cmd/link/testdata/layout.s2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/link/testdata/autosection.s b/src/cmd/link/testdata/autosection.s
index 8a579b702..fd9e94da4 100644
--- a/src/cmd/link/testdata/autosection.s
+++ b/src/cmd/link/testdata/autosection.s
@@ -4,7 +4,7 @@
// Test of section-named symbols.
-#include "../../ld/textflag.h"
+#include "textflag.h"
TEXT start(SB),7,$0
MOVQ $autotab(SB),AX
diff --git a/src/cmd/link/testdata/layout.s b/src/cmd/link/testdata/layout.s
index 0d492c5af..c3e55ef49 100644
--- a/src/cmd/link/testdata/layout.s
+++ b/src/cmd/link/testdata/layout.s
@@ -5,7 +5,7 @@
// 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"
+#include "textflag.h"
TEXT text_start(SB),7,$0
MOVQ $rodata_sym(SB), AX