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://golang.org/cl/128050043
diff --git a/src/pkg/crypto/aes/asm_amd64.s b/src/pkg/crypto/aes/asm_amd64.s
index 5c22881..6a6e6ac 100644
--- a/src/pkg/crypto/aes/asm_amd64.s
+++ b/src/pkg/crypto/aes/asm_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// func hasAsm() bool
// returns whether AES-NI is supported
diff --git a/src/pkg/crypto/md5/md5block_386.s b/src/pkg/crypto/md5/md5block_386.s
index e5c27ac..8e426d1 100644
--- a/src/pkg/crypto/md5/md5block_386.s
+++ b/src/pkg/crypto/md5/md5block_386.s
@@ -6,7 +6,7 @@
// #defines generating 8a assembly, and adjusted for 386,
// by the Go Authors.
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// MD5 optimized for AMD64.
//
diff --git a/src/pkg/crypto/md5/md5block_amd64.s b/src/pkg/crypto/md5/md5block_amd64.s
index 178e49c..a3ae7d9 100644
--- a/src/pkg/crypto/md5/md5block_amd64.s
+++ b/src/pkg/crypto/md5/md5block_amd64.s
@@ -5,7 +5,7 @@
// Translated from Perl generating GNU assembly into
// #defines generating 6a assembly by the Go Authors.
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// MD5 optimized for AMD64.
//
diff --git a/src/pkg/crypto/md5/md5block_amd64p32.s b/src/pkg/crypto/md5/md5block_amd64p32.s
index a78a3f6..d918a67 100644
--- a/src/pkg/crypto/md5/md5block_amd64p32.s
+++ b/src/pkg/crypto/md5/md5block_amd64p32.s
@@ -9,7 +9,7 @@
// replace BP with R11, reloaded before use at return.
// replace R15 with R11.
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// MD5 optimized for AMD64.
//
diff --git a/src/pkg/crypto/md5/md5block_arm.s b/src/pkg/crypto/md5/md5block_arm.s
index e644bfc..3b26e54 100644
--- a/src/pkg/crypto/md5/md5block_arm.s
+++ b/src/pkg/crypto/md5/md5block_arm.s
@@ -4,7 +4,7 @@
//
// ARM version of md5block.go
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// Register definitions
table = 0 // Pointer to MD5 constants table
diff --git a/src/pkg/crypto/rc4/rc4_386.s b/src/pkg/crypto/rc4/rc4_386.s
index b04fc1f..5422103 100644
--- a/src/pkg/crypto/rc4/rc4_386.s
+++ b/src/pkg/crypto/rc4/rc4_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// func xorKeyStream(dst, src *byte, n int, state *[256]byte, i, j *uint8)
TEXT ·xorKeyStream(SB),NOSPLIT,$0
diff --git a/src/pkg/crypto/rc4/rc4_amd64.s b/src/pkg/crypto/rc4/rc4_amd64.s
index e3234b6..57d941c 100644
--- a/src/pkg/crypto/rc4/rc4_amd64.s
+++ b/src/pkg/crypto/rc4/rc4_amd64.s
@@ -2,7 +2,7 @@
// http://www.zorinaq.com/papers/rc4-amd64.html
// http://www.zorinaq.com/papers/rc4-amd64.tar.bz2
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// Local modifications:
//
diff --git a/src/pkg/crypto/rc4/rc4_amd64p32.s b/src/pkg/crypto/rc4/rc4_amd64p32.s
index 27d8495..970b34e 100644
--- a/src/pkg/crypto/rc4/rc4_amd64p32.s
+++ b/src/pkg/crypto/rc4/rc4_amd64p32.s
@@ -2,7 +2,7 @@
// http://www.zorinaq.com/papers/rc4-amd64.html
// http://www.zorinaq.com/papers/rc4-amd64.tar.bz2
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// Local modifications:
//
diff --git a/src/pkg/crypto/rc4/rc4_arm.s b/src/pkg/crypto/rc4/rc4_arm.s
index b9ac723..51be3bf 100644
--- a/src/pkg/crypto/rc4/rc4_arm.s
+++ b/src/pkg/crypto/rc4/rc4_arm.s
@@ -4,7 +4,7 @@
// +build !nacl
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// Registers
dst = 0
diff --git a/src/pkg/crypto/sha1/sha1block_386.s b/src/pkg/crypto/sha1/sha1block_386.s
index 688851c..a0adabc 100644
--- a/src/pkg/crypto/sha1/sha1block_386.s
+++ b/src/pkg/crypto/sha1/sha1block_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// SHA1 block routine. See sha1block.go for Go equivalent.
//
diff --git a/src/pkg/crypto/sha1/sha1block_amd64.s b/src/pkg/crypto/sha1/sha1block_amd64.s
index 8ffb9d5..4319df6 100644
--- a/src/pkg/crypto/sha1/sha1block_amd64.s
+++ b/src/pkg/crypto/sha1/sha1block_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// SHA1 block routine. See sha1block.go for Go equivalent.
//
diff --git a/src/pkg/crypto/sha1/sha1block_amd64p32.s b/src/pkg/crypto/sha1/sha1block_amd64p32.s
index 3c589d9..d93fbf1 100644
--- a/src/pkg/crypto/sha1/sha1block_amd64p32.s
+++ b/src/pkg/crypto/sha1/sha1block_amd64p32.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// SHA1 block routine. See sha1block.go for Go equivalent.
//
diff --git a/src/pkg/crypto/sha1/sha1block_arm.s b/src/pkg/crypto/sha1/sha1block_arm.s
index 5917e8b..f11f33d 100644
--- a/src/pkg/crypto/sha1/sha1block_arm.s
+++ b/src/pkg/crypto/sha1/sha1block_arm.s
@@ -4,7 +4,7 @@
//
// ARM version of md5block.go
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// SHA1 block routine. See sha1block.go for Go equivalent.
//
diff --git a/src/pkg/crypto/sha256/sha256block_amd64.s b/src/pkg/crypto/sha256/sha256block_amd64.s
index 95aebbe..868eaed 100644
--- a/src/pkg/crypto/sha256/sha256block_amd64.s
+++ b/src/pkg/crypto/sha256/sha256block_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// SHA256 block routine. See sha256block.go for Go equivalent.
//
diff --git a/src/pkg/crypto/sha512/sha512block_amd64.s b/src/pkg/crypto/sha512/sha512block_amd64.s
index 344d8d2..2e10233 100644
--- a/src/pkg/crypto/sha512/sha512block_amd64.s
+++ b/src/pkg/crypto/sha512/sha512block_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// SHA512 block routine. See sha512block.go for Go equivalent.
//
diff --git a/src/pkg/hash/crc32/crc32_amd64.s b/src/pkg/hash/crc32/crc32_amd64.s
index 95dc8bf..30b0d06 100644
--- a/src/pkg/hash/crc32/crc32_amd64.s
+++ b/src/pkg/hash/crc32/crc32_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// func castagnoliSSE42(crc uint32, p []byte) uint32
TEXT ·castagnoliSSE42(SB),NOSPLIT,$0
diff --git a/src/pkg/hash/crc32/crc32_amd64p32.s b/src/pkg/hash/crc32/crc32_amd64p32.s
index e34f208..b6770eb 100644
--- a/src/pkg/hash/crc32/crc32_amd64p32.s
+++ b/src/pkg/hash/crc32/crc32_amd64p32.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// func castagnoliSSE42(crc uint32, p []byte) uint32
TEXT ·castagnoliSSE42(SB),NOSPLIT,$0
diff --git a/src/pkg/math/abs_386.s b/src/pkg/math/abs_386.s
index 3490cf6..f30a439 100644
--- a/src/pkg/math/abs_386.s
+++ b/src/pkg/math/abs_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Abs(x float64) float64
TEXT ·Abs(SB),NOSPLIT,$0
diff --git a/src/pkg/math/abs_amd64.s b/src/pkg/math/abs_amd64.s
index 779c8f5..0424eb5 100644
--- a/src/pkg/math/abs_amd64.s
+++ b/src/pkg/math/abs_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Abs(x float64) float64
TEXT ·Abs(SB),NOSPLIT,$0
diff --git a/src/pkg/math/abs_arm.s b/src/pkg/math/abs_arm.s
index b5117ab..bfa77eb 100644
--- a/src/pkg/math/abs_arm.s
+++ b/src/pkg/math/abs_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Abs(SB),NOSPLIT,$0
MOVW x_lo+0(FP), R0
diff --git a/src/pkg/math/asin_386.s b/src/pkg/math/asin_386.s
index 2c1d270..4f34e12 100644
--- a/src/pkg/math/asin_386.s
+++ b/src/pkg/math/asin_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Asin(x float64) float64
TEXT ·Asin(SB),NOSPLIT,$0
diff --git a/src/pkg/math/asin_amd64.s b/src/pkg/math/asin_amd64.s
index ea48104..1a43d48 100644
--- a/src/pkg/math/asin_amd64.s
+++ b/src/pkg/math/asin_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Asin(SB),NOSPLIT,$0
JMP ·asin(SB)
diff --git a/src/pkg/math/asin_arm.s b/src/pkg/math/asin_arm.s
index b905260..8fe03b6 100644
--- a/src/pkg/math/asin_arm.s
+++ b/src/pkg/math/asin_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Asin(SB),NOSPLIT,$0
B ·asin(SB)
diff --git a/src/pkg/math/atan2_386.s b/src/pkg/math/atan2_386.s
index fb64931..31a74e7 100644
--- a/src/pkg/math/atan2_386.s
+++ b/src/pkg/math/atan2_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Atan2(y, x float64) float64 // =atan(y/x)
TEXT ·Atan2(SB),NOSPLIT,$0
diff --git a/src/pkg/math/atan2_amd64.s b/src/pkg/math/atan2_amd64.s
index f7a5a11..fc471f7 100644
--- a/src/pkg/math/atan2_amd64.s
+++ b/src/pkg/math/atan2_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Atan2(SB),NOSPLIT,$0
JMP ·atan2(SB)
diff --git a/src/pkg/math/atan2_arm.s b/src/pkg/math/atan2_arm.s
index 24bff2c..06c12ec 100644
--- a/src/pkg/math/atan2_arm.s
+++ b/src/pkg/math/atan2_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Atan2(SB),NOSPLIT,$0
B ·atan2(SB)
diff --git a/src/pkg/math/atan_386.s b/src/pkg/math/atan_386.s
index aad8ffc..f3976b1 100644
--- a/src/pkg/math/atan_386.s
+++ b/src/pkg/math/atan_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Atan(x float64) float64
TEXT ·Atan(SB),NOSPLIT,$0
diff --git a/src/pkg/math/atan_amd64.s b/src/pkg/math/atan_amd64.s
index fc4a91b..b801ae9 100644
--- a/src/pkg/math/atan_amd64.s
+++ b/src/pkg/math/atan_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Atan(SB),NOSPLIT,$0
JMP ·atan(SB)
diff --git a/src/pkg/math/atan_arm.s b/src/pkg/math/atan_arm.s
index defa93a..d190a8b 100644
--- a/src/pkg/math/atan_arm.s
+++ b/src/pkg/math/atan_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Atan(SB),NOSPLIT,$0
B ·atan(SB)
diff --git a/src/pkg/math/big/arith_386.s b/src/pkg/math/big/arith_386.s
index 15b036c..1b47c89 100644
--- a/src/pkg/math/big/arith_386.s
+++ b/src/pkg/math/big/arith_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// This file provides fast assembly versions for the elementary
// arithmetic operations on vectors implemented in arith.go.
diff --git a/src/pkg/math/big/arith_amd64.s b/src/pkg/math/big/arith_amd64.s
index e2113a7..56c4cb0 100644
--- a/src/pkg/math/big/arith_amd64.s
+++ b/src/pkg/math/big/arith_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// This file provides fast assembly versions for the elementary
// arithmetic operations on vectors implemented in arith.go.
diff --git a/src/pkg/math/big/arith_amd64p32.s b/src/pkg/math/big/arith_amd64p32.s
index 227870a..908dbbd 100644
--- a/src/pkg/math/big/arith_amd64p32.s
+++ b/src/pkg/math/big/arith_amd64p32.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·mulWW(SB),NOSPLIT,$0
JMP ·mulWW_g(SB)
diff --git a/src/pkg/math/big/arith_arm.s b/src/pkg/math/big/arith_arm.s
index 8d36761..a4c51c2 100644
--- a/src/pkg/math/big/arith_arm.s
+++ b/src/pkg/math/big/arith_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// This file provides fast assembly versions for the elementary
// arithmetic operations on vectors implemented in arith.go.
diff --git a/src/pkg/math/dim_386.s b/src/pkg/math/dim_386.s
index f715114..c8194fe 100644
--- a/src/pkg/math/dim_386.s
+++ b/src/pkg/math/dim_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Dim(SB),NOSPLIT,$0
JMP ·dim(SB)
diff --git a/src/pkg/math/dim_amd64.s b/src/pkg/math/dim_amd64.s
index 38423ef..622cc3f 100644
--- a/src/pkg/math/dim_amd64.s
+++ b/src/pkg/math/dim_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
#define PosInf 0x7FF0000000000000
#define NaN 0x7FF8000000000001
diff --git a/src/pkg/math/dim_arm.s b/src/pkg/math/dim_arm.s
index 162f08c..be66950 100644
--- a/src/pkg/math/dim_arm.s
+++ b/src/pkg/math/dim_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Dim(SB),NOSPLIT,$0
B ·dim(SB)
diff --git a/src/pkg/math/exp2_386.s b/src/pkg/math/exp2_386.s
index 71959d9..7d11920 100644
--- a/src/pkg/math/exp2_386.s
+++ b/src/pkg/math/exp2_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Exp2(x float64) float64
TEXT ·Exp2(SB),NOSPLIT,$0
diff --git a/src/pkg/math/exp2_amd64.s b/src/pkg/math/exp2_amd64.s
index 77a53da..903c835 100644
--- a/src/pkg/math/exp2_amd64.s
+++ b/src/pkg/math/exp2_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Exp2(SB),NOSPLIT,$0
JMP ·exp2(SB)
diff --git a/src/pkg/math/exp2_arm.s b/src/pkg/math/exp2_arm.s
index fe51f25..58283cd 100644
--- a/src/pkg/math/exp2_arm.s
+++ b/src/pkg/math/exp2_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Exp2(SB),NOSPLIT,$0
B ·exp2(SB)
diff --git a/src/pkg/math/exp_386.s b/src/pkg/math/exp_386.s
index af2d680..6a478a5 100644
--- a/src/pkg/math/exp_386.s
+++ b/src/pkg/math/exp_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Exp(x float64) float64
TEXT ·Exp(SB),NOSPLIT,$0
diff --git a/src/pkg/math/exp_amd64.s b/src/pkg/math/exp_amd64.s
index 070b452..d9cf8fd 100644
--- a/src/pkg/math/exp_amd64.s
+++ b/src/pkg/math/exp_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// The method is based on a paper by Naoki Shibata: "Efficient evaluation
// methods of elementary functions suitable for SIMD computation", Proc.
diff --git a/src/pkg/math/exp_arm.s b/src/pkg/math/exp_arm.s
index 130b502..ce36d03 100644
--- a/src/pkg/math/exp_arm.s
+++ b/src/pkg/math/exp_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Exp(SB),NOSPLIT,$0
B ·exp(SB)
diff --git a/src/pkg/math/expm1_386.s b/src/pkg/math/expm1_386.s
index b268c58..a48ca8a 100644
--- a/src/pkg/math/expm1_386.s
+++ b/src/pkg/math/expm1_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Expm1(x float64) float64
TEXT ·Expm1(SB),NOSPLIT,$0
diff --git a/src/pkg/math/expm1_amd64.s b/src/pkg/math/expm1_amd64.s
index 66a75b3..b7d5a3b 100644
--- a/src/pkg/math/expm1_amd64.s
+++ b/src/pkg/math/expm1_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Expm1(SB),NOSPLIT,$0
JMP ·expm1(SB)
diff --git a/src/pkg/math/expm1_arm.s b/src/pkg/math/expm1_arm.s
index 8387444..5f80d87 100644
--- a/src/pkg/math/expm1_arm.s
+++ b/src/pkg/math/expm1_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Expm1(SB),NOSPLIT,$0
B ·expm1(SB)
diff --git a/src/pkg/math/floor_386.s b/src/pkg/math/floor_386.s
index 37d5a45..31c9b17 100644
--- a/src/pkg/math/floor_386.s
+++ b/src/pkg/math/floor_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Ceil(x float64) float64
TEXT ·Ceil(SB),NOSPLIT,$0
diff --git a/src/pkg/math/floor_amd64.s b/src/pkg/math/floor_amd64.s
index 2fd31c4..67b7cde 100644
--- a/src/pkg/math/floor_amd64.s
+++ b/src/pkg/math/floor_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
#define Big 0x4330000000000000 // 2**52
diff --git a/src/pkg/math/floor_arm.s b/src/pkg/math/floor_arm.s
index cb3b98e..5909176 100644
--- a/src/pkg/math/floor_arm.s
+++ b/src/pkg/math/floor_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Floor(SB),NOSPLIT,$0
B ·floor(SB)
diff --git a/src/pkg/math/frexp_386.s b/src/pkg/math/frexp_386.s
index c6d0a80..5bff7e2 100644
--- a/src/pkg/math/frexp_386.s
+++ b/src/pkg/math/frexp_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Frexp(f float64) (frac float64, exp int)
TEXT ·Frexp(SB),NOSPLIT,$0
diff --git a/src/pkg/math/frexp_amd64.s b/src/pkg/math/frexp_amd64.s
index 03d1012..93a3210 100644
--- a/src/pkg/math/frexp_amd64.s
+++ b/src/pkg/math/frexp_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Frexp(SB),NOSPLIT,$0
JMP ·frexp(SB)
diff --git a/src/pkg/math/frexp_arm.s b/src/pkg/math/frexp_arm.s
index 9d40ae4..7842eca 100644
--- a/src/pkg/math/frexp_arm.s
+++ b/src/pkg/math/frexp_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Frexp(SB),NOSPLIT,$0
B ·frexp(SB)
diff --git a/src/pkg/math/hypot_386.s b/src/pkg/math/hypot_386.s
index eec1bf5..d321f46 100644
--- a/src/pkg/math/hypot_386.s
+++ b/src/pkg/math/hypot_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Hypot(p, q float64) float64
TEXT ·Hypot(SB),NOSPLIT,$0
diff --git a/src/pkg/math/hypot_amd64.s b/src/pkg/math/hypot_amd64.s
index 5c0ff4d..a68eebc 100644
--- a/src/pkg/math/hypot_amd64.s
+++ b/src/pkg/math/hypot_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
#define PosInf 0x7FF0000000000000
#define NaN 0x7FF8000000000001
diff --git a/src/pkg/math/hypot_arm.s b/src/pkg/math/hypot_arm.s
index 2562aa8..9c8abca 100644
--- a/src/pkg/math/hypot_arm.s
+++ b/src/pkg/math/hypot_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Hypot(SB),NOSPLIT,$0
B ·hypot(SB)
diff --git a/src/pkg/math/ldexp_386.s b/src/pkg/math/ldexp_386.s
index baf377e..ac8e8ba 100644
--- a/src/pkg/math/ldexp_386.s
+++ b/src/pkg/math/ldexp_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Ldexp(frac float64, exp int) float64
TEXT ·Ldexp(SB),NOSPLIT,$0
diff --git a/src/pkg/math/ldexp_amd64.s b/src/pkg/math/ldexp_amd64.s
index c7fc226..6063a64 100644
--- a/src/pkg/math/ldexp_amd64.s
+++ b/src/pkg/math/ldexp_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Ldexp(SB),NOSPLIT,$0
JMP ·ldexp(SB)
diff --git a/src/pkg/math/ldexp_arm.s b/src/pkg/math/ldexp_arm.s
index 16744ea..fcffa2e 100644
--- a/src/pkg/math/ldexp_arm.s
+++ b/src/pkg/math/ldexp_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Ldexp(SB),NOSPLIT,$0
B ·ldexp(SB)
diff --git a/src/pkg/math/log10_386.s b/src/pkg/math/log10_386.s
index 4ae069d..2897f3c 100644
--- a/src/pkg/math/log10_386.s
+++ b/src/pkg/math/log10_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Log10(x float64) float64
TEXT ·Log10(SB),NOSPLIT,$0
diff --git a/src/pkg/math/log10_amd64.s b/src/pkg/math/log10_amd64.s
index b9ae832..8382ba7 100644
--- a/src/pkg/math/log10_amd64.s
+++ b/src/pkg/math/log10_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Log10(SB),NOSPLIT,$0
JMP ·log10(SB)
diff --git a/src/pkg/math/log10_arm.s b/src/pkg/math/log10_arm.s
index fa7580f..dbcb835 100644
--- a/src/pkg/math/log10_arm.s
+++ b/src/pkg/math/log10_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Log10(SB),NOSPLIT,$0
B ·log10(SB)
diff --git a/src/pkg/math/log1p_386.s b/src/pkg/math/log1p_386.s
index 3b30fd5..1c2d683 100644
--- a/src/pkg/math/log1p_386.s
+++ b/src/pkg/math/log1p_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Log1p(x float64) float64
TEXT ·Log1p(SB),NOSPLIT,$0
diff --git a/src/pkg/math/log1p_amd64.s b/src/pkg/math/log1p_amd64.s
index 48c24f4..1e58fb1 100644
--- a/src/pkg/math/log1p_amd64.s
+++ b/src/pkg/math/log1p_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Log1p(SB),NOSPLIT,$0
JMP ·log1p(SB)
diff --git a/src/pkg/math/log1p_arm.s b/src/pkg/math/log1p_arm.s
index fd2740d..95d5496 100644
--- a/src/pkg/math/log1p_arm.s
+++ b/src/pkg/math/log1p_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Log1p(SB),NOSPLIT,$0
B ·log1p(SB)
diff --git a/src/pkg/math/log_386.s b/src/pkg/math/log_386.s
index 21a0633..ff998af 100644
--- a/src/pkg/math/log_386.s
+++ b/src/pkg/math/log_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Log(x float64) float64
TEXT ·Log(SB),NOSPLIT,$0
diff --git a/src/pkg/math/log_amd64.s b/src/pkg/math/log_amd64.s
index dffc5ae..84c60ab 100644
--- a/src/pkg/math/log_amd64.s
+++ b/src/pkg/math/log_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
#define HSqrt2 7.07106781186547524401e-01 // sqrt(2)/2
#define Ln2Hi 6.93147180369123816490e-01 // 0x3fe62e42fee00000
diff --git a/src/pkg/math/log_arm.s b/src/pkg/math/log_arm.s
index 28448ae..e21d036 100644
--- a/src/pkg/math/log_arm.s
+++ b/src/pkg/math/log_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Log(SB),NOSPLIT,$0
B ·log(SB)
diff --git a/src/pkg/math/mod_386.s b/src/pkg/math/mod_386.s
index 9b3b6bd..10ad98b 100644
--- a/src/pkg/math/mod_386.s
+++ b/src/pkg/math/mod_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Mod(x, y float64) float64
TEXT ·Mod(SB),NOSPLIT,$0
diff --git a/src/pkg/math/mod_amd64.s b/src/pkg/math/mod_amd64.s
index bef83fc..f99dbe2 100644
--- a/src/pkg/math/mod_amd64.s
+++ b/src/pkg/math/mod_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Mod(SB),NOSPLIT,$0
JMP ·mod(SB)
diff --git a/src/pkg/math/mod_arm.s b/src/pkg/math/mod_arm.s
index 1f51588..5afb359 100644
--- a/src/pkg/math/mod_arm.s
+++ b/src/pkg/math/mod_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Mod(SB),NOSPLIT,$0
B ·mod(SB)
diff --git a/src/pkg/math/modf_386.s b/src/pkg/math/modf_386.s
index 07a0dc5..3debd3b 100644
--- a/src/pkg/math/modf_386.s
+++ b/src/pkg/math/modf_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Modf(f float64) (int float64, frac float64)
TEXT ·Modf(SB),NOSPLIT,$0
diff --git a/src/pkg/math/modf_amd64.s b/src/pkg/math/modf_amd64.s
index 05feb4b..701cf72 100644
--- a/src/pkg/math/modf_amd64.s
+++ b/src/pkg/math/modf_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Modf(SB),NOSPLIT,$0
JMP ·modf(SB)
diff --git a/src/pkg/math/modf_arm.s b/src/pkg/math/modf_arm.s
index e6bd26d..ea3c8dc 100644
--- a/src/pkg/math/modf_arm.s
+++ b/src/pkg/math/modf_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Modf(SB),NOSPLIT,$0
B ·modf(SB)
diff --git a/src/pkg/math/remainder_386.s b/src/pkg/math/remainder_386.s
index bbe13a0..318fa2c 100644
--- a/src/pkg/math/remainder_386.s
+++ b/src/pkg/math/remainder_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Remainder(x, y float64) float64
TEXT ·Remainder(SB),NOSPLIT,$0
diff --git a/src/pkg/math/remainder_amd64.s b/src/pkg/math/remainder_amd64.s
index e5e23c7..f7fda99 100644
--- a/src/pkg/math/remainder_amd64.s
+++ b/src/pkg/math/remainder_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Remainder(SB),NOSPLIT,$0
JMP ·remainder(SB)
diff --git a/src/pkg/math/remainder_arm.s b/src/pkg/math/remainder_arm.s
index 8728afe..1ae597a 100644
--- a/src/pkg/math/remainder_arm.s
+++ b/src/pkg/math/remainder_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Remainder(SB),NOSPLIT,$0
B ·remainder(SB)
diff --git a/src/pkg/math/sin_386.s b/src/pkg/math/sin_386.s
index 09271c0..ccc8e64 100644
--- a/src/pkg/math/sin_386.s
+++ b/src/pkg/math/sin_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Cos(x float64) float64
TEXT ·Cos(SB),NOSPLIT,$0
diff --git a/src/pkg/math/sin_amd64.s b/src/pkg/math/sin_amd64.s
index 008bf4b..0c33cec 100644
--- a/src/pkg/math/sin_amd64.s
+++ b/src/pkg/math/sin_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Sin(SB),NOSPLIT,$0
JMP ·sin(SB)
diff --git a/src/pkg/math/sin_arm.s b/src/pkg/math/sin_arm.s
index a057b4f..467af3d 100644
--- a/src/pkg/math/sin_arm.s
+++ b/src/pkg/math/sin_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Sin(SB),NOSPLIT,$0
B ·sin(SB)
diff --git a/src/pkg/math/sincos_386.s b/src/pkg/math/sincos_386.s
index bf964b1..83af501 100644
--- a/src/pkg/math/sincos_386.s
+++ b/src/pkg/math/sincos_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Sincos(x float64) (sin, cos float64)
TEXT ·Sincos(SB),NOSPLIT,$0
diff --git a/src/pkg/math/sincos_amd64.s b/src/pkg/math/sincos_amd64.s
index bccc1ad..dae636b 100644
--- a/src/pkg/math/sincos_amd64.s
+++ b/src/pkg/math/sincos_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// The method is based on a paper by Naoki Shibata: "Efficient evaluation
// methods of elementary functions suitable for SIMD computation", Proc.
diff --git a/src/pkg/math/sincos_arm.s b/src/pkg/math/sincos_arm.s
index b6866af..9fe0482 100644
--- a/src/pkg/math/sincos_arm.s
+++ b/src/pkg/math/sincos_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Sincos(SB),NOSPLIT,$0
B ·sincos(SB)
diff --git a/src/pkg/math/sqrt_386.s b/src/pkg/math/sqrt_386.s
index 2d0c786..5234a1e 100644
--- a/src/pkg/math/sqrt_386.s
+++ b/src/pkg/math/sqrt_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Sqrt(x float64) float64
TEXT ·Sqrt(SB),NOSPLIT,$0
diff --git a/src/pkg/math/sqrt_amd64.s b/src/pkg/math/sqrt_amd64.s
index 1508944..443d83f 100644
--- a/src/pkg/math/sqrt_amd64.s
+++ b/src/pkg/math/sqrt_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Sqrt(x float64) float64
TEXT ·Sqrt(SB),NOSPLIT,$0
diff --git a/src/pkg/math/sqrt_arm.s b/src/pkg/math/sqrt_arm.s
index f731ee9..4f9dc2e 100644
--- a/src/pkg/math/sqrt_arm.s
+++ b/src/pkg/math/sqrt_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Sqrt(x float64) float64
TEXT ·Sqrt(SB),NOSPLIT,$0
diff --git a/src/pkg/math/tan_386.s b/src/pkg/math/tan_386.s
index 2320326..f1bdae1 100644
--- a/src/pkg/math/tan_386.s
+++ b/src/pkg/math/tan_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// func Tan(x float64) float64
TEXT ·Tan(SB),NOSPLIT,$0
diff --git a/src/pkg/math/tan_amd64.s b/src/pkg/math/tan_amd64.s
index 9fa5f14..39aa080 100644
--- a/src/pkg/math/tan_amd64.s
+++ b/src/pkg/math/tan_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Tan(SB),NOSPLIT,$0
JMP ·tan(SB)
diff --git a/src/pkg/math/tan_arm.s b/src/pkg/math/tan_arm.s
index 68fea31..36c7c12 100644
--- a/src/pkg/math/tan_arm.s
+++ b/src/pkg/math/tan_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·Tan(SB),NOSPLIT,$0
B ·tan(SB)
diff --git a/src/pkg/os/signal/sig.s b/src/pkg/os/signal/sig.s
index f860924..d54c284 100644
--- a/src/pkg/os/signal/sig.s
+++ b/src/pkg/os/signal/sig.s
@@ -6,7 +6,7 @@
// +build amd64 amd64p32 arm 386
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
#ifdef GOARCH_arm
#define JMP B
diff --git a/src/pkg/reflect/asm_386.s b/src/pkg/reflect/asm_386.s
index a538624..8c84bba 100644
--- a/src/pkg/reflect/asm_386.s
+++ b/src/pkg/reflect/asm_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// makeFuncStub is the code half of the function returned by MakeFunc.
// See the comment on the declaration of makeFuncStub in makefunc.go
diff --git a/src/pkg/reflect/asm_amd64.s b/src/pkg/reflect/asm_amd64.s
index 12a8879..195928b 100644
--- a/src/pkg/reflect/asm_amd64.s
+++ b/src/pkg/reflect/asm_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// makeFuncStub is the code half of the function returned by MakeFunc.
// See the comment on the declaration of makeFuncStub in makefunc.go
diff --git a/src/pkg/reflect/asm_amd64p32.s b/src/pkg/reflect/asm_amd64p32.s
index a538624..8c84bba 100644
--- a/src/pkg/reflect/asm_amd64p32.s
+++ b/src/pkg/reflect/asm_amd64p32.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// makeFuncStub is the code half of the function returned by MakeFunc.
// See the comment on the declaration of makeFuncStub in makefunc.go
diff --git a/src/pkg/reflect/asm_arm.s b/src/pkg/reflect/asm_arm.s
index 69e4ab4..fafc6f3 100644
--- a/src/pkg/reflect/asm_arm.s
+++ b/src/pkg/reflect/asm_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
// makeFuncStub is jumped to by the code generated by MakeFunc.
// See the comment on the declaration of makeFuncStub in makefunc.go
diff --git a/src/pkg/sync/atomic/asm_386.s b/src/pkg/sync/atomic/asm_386.s
index 807c2f8..740dfe7 100644
--- a/src/pkg/sync/atomic/asm_386.s
+++ b/src/pkg/sync/atomic/asm_386.s
@@ -4,7 +4,7 @@
// +build !race
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·SwapInt32(SB),NOSPLIT,$0-12
JMP ·SwapUint32(SB)
diff --git a/src/pkg/sync/atomic/asm_amd64.s b/src/pkg/sync/atomic/asm_amd64.s
index 77afa12..6e53ebe 100644
--- a/src/pkg/sync/atomic/asm_amd64.s
+++ b/src/pkg/sync/atomic/asm_amd64.s
@@ -4,7 +4,7 @@
// +build !race
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·SwapInt32(SB),NOSPLIT,$0-20
JMP ·SwapUint32(SB)
diff --git a/src/pkg/sync/atomic/asm_amd64p32.s b/src/pkg/sync/atomic/asm_amd64p32.s
index b24ae7a..d77cc2c 100644
--- a/src/pkg/sync/atomic/asm_amd64p32.s
+++ b/src/pkg/sync/atomic/asm_amd64p32.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·SwapInt32(SB),NOSPLIT,$0-12
JMP ·SwapUint32(SB)
diff --git a/src/pkg/sync/atomic/asm_arm.s b/src/pkg/sync/atomic/asm_arm.s
index 7c8620a..47639a8 100644
--- a/src/pkg/sync/atomic/asm_arm.s
+++ b/src/pkg/sync/atomic/asm_arm.s
@@ -4,7 +4,7 @@
// +build !race
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// ARM atomic operations, for use by asm_$(GOOS)_arm.s.
diff --git a/src/pkg/sync/atomic/asm_freebsd_arm.s b/src/pkg/sync/atomic/asm_freebsd_arm.s
index db37f73..06b975e 100644
--- a/src/pkg/sync/atomic/asm_freebsd_arm.s
+++ b/src/pkg/sync/atomic/asm_freebsd_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// FreeBSD/ARM atomic operations.
// TODO(minux): this only supports ARMv6K or higher.
diff --git a/src/pkg/sync/atomic/asm_linux_arm.s b/src/pkg/sync/atomic/asm_linux_arm.s
index 27be57a..bfcfd79 100644
--- a/src/pkg/sync/atomic/asm_linux_arm.s
+++ b/src/pkg/sync/atomic/asm_linux_arm.s
@@ -4,7 +4,7 @@
// +build !race
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// Linux/ARM atomic operations.
diff --git a/src/pkg/sync/atomic/asm_nacl_arm.s b/src/pkg/sync/atomic/asm_nacl_arm.s
index 084ab71..76f6233 100644
--- a/src/pkg/sync/atomic/asm_nacl_arm.s
+++ b/src/pkg/sync/atomic/asm_nacl_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// NaCl/ARM atomic operations.
// NaCl/ARM explicitly targets ARMv7A.
diff --git a/src/pkg/sync/atomic/asm_netbsd_arm.s b/src/pkg/sync/atomic/asm_netbsd_arm.s
index 64f4dbe..dbe8089 100644
--- a/src/pkg/sync/atomic/asm_netbsd_arm.s
+++ b/src/pkg/sync/atomic/asm_netbsd_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../../cmd/ld/textflag.h"
+#include "textflag.h"
// NetBSD/ARM atomic operations.
// TODO(minux): this only supports ARMv6K or higher.
diff --git a/src/pkg/syscall/asm_darwin_386.s b/src/pkg/syscall/asm_darwin_386.s
index 9b4dfa8..dfe94fb 100644
--- a/src/pkg/syscall/asm_darwin_386.s
+++ b/src/pkg/syscall/asm_darwin_386.s
@@ -5,7 +5,7 @@
// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
// so that go vet can check that they are correct.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
//
// System call support for 386, Darwin
diff --git a/src/pkg/syscall/asm_darwin_amd64.s b/src/pkg/syscall/asm_darwin_amd64.s
index 19ea05b..d6f1c96 100644
--- a/src/pkg/syscall/asm_darwin_amd64.s
+++ b/src/pkg/syscall/asm_darwin_amd64.s
@@ -5,7 +5,7 @@
// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
// so that go vet can check that they are correct.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
//
// System call support for AMD64, Darwin
diff --git a/src/pkg/syscall/asm_dragonfly_386.s b/src/pkg/syscall/asm_dragonfly_386.s
index d24216f..37d655f 100644
--- a/src/pkg/syscall/asm_dragonfly_386.s
+++ b/src/pkg/syscall/asm_dragonfly_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
//
// System call support for 386, FreeBSD
diff --git a/src/pkg/syscall/asm_dragonfly_amd64.s b/src/pkg/syscall/asm_dragonfly_amd64.s
index 31d1074..c8434f9 100644
--- a/src/pkg/syscall/asm_dragonfly_amd64.s
+++ b/src/pkg/syscall/asm_dragonfly_amd64.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
//
// System call support for AMD64, DragonFly
diff --git a/src/pkg/syscall/asm_freebsd_386.s b/src/pkg/syscall/asm_freebsd_386.s
index 91a46b1..f50b5a0 100644
--- a/src/pkg/syscall/asm_freebsd_386.s
+++ b/src/pkg/syscall/asm_freebsd_386.s
@@ -5,7 +5,7 @@
// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
// so that go vet can check that they are correct.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
//
// System call support for 386, FreeBSD
diff --git a/src/pkg/syscall/asm_freebsd_amd64.s b/src/pkg/syscall/asm_freebsd_amd64.s
index 7abb3682..58cbfe1 100644
--- a/src/pkg/syscall/asm_freebsd_amd64.s
+++ b/src/pkg/syscall/asm_freebsd_amd64.s
@@ -5,7 +5,7 @@
// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
// so that go vet can check that they are correct.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
//
// System call support for AMD64, FreeBSD
diff --git a/src/pkg/syscall/asm_freebsd_arm.s b/src/pkg/syscall/asm_freebsd_arm.s
index c01ce6f..5eb4033 100644
--- a/src/pkg/syscall/asm_freebsd_arm.s
+++ b/src/pkg/syscall/asm_freebsd_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
//
// System call support for ARM, FreeBSD
diff --git a/src/pkg/syscall/asm_linux_386.s b/src/pkg/syscall/asm_linux_386.s
index 30b2207..05cf89a 100644
--- a/src/pkg/syscall/asm_linux_386.s
+++ b/src/pkg/syscall/asm_linux_386.s
@@ -5,7 +5,7 @@
// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
// so that go vet can check that they are correct.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
//
// System calls for 386, Linux
diff --git a/src/pkg/syscall/asm_linux_amd64.s b/src/pkg/syscall/asm_linux_amd64.s
index 995b60e..5146932 100644
--- a/src/pkg/syscall/asm_linux_amd64.s
+++ b/src/pkg/syscall/asm_linux_amd64.s
@@ -5,7 +5,7 @@
// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
// so that go vet can check that they are correct.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
//
// System calls for AMD64, Linux
diff --git a/src/pkg/syscall/asm_linux_arm.s b/src/pkg/syscall/asm_linux_arm.s
index a28bc6c..014fa61 100644
--- a/src/pkg/syscall/asm_linux_arm.s
+++ b/src/pkg/syscall/asm_linux_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
//
// System calls for arm, Linux
diff --git a/src/pkg/syscall/asm_nacl_386.s b/src/pkg/syscall/asm_nacl_386.s
index de7c3cc..3c86dec 100644
--- a/src/pkg/syscall/asm_nacl_386.s
+++ b/src/pkg/syscall/asm_nacl_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
#include "../runtime/syscall_nacl.h"
//
diff --git a/src/pkg/syscall/asm_nacl_amd64p32.s b/src/pkg/syscall/asm_nacl_amd64p32.s
index de030ec..b91e09b 100644
--- a/src/pkg/syscall/asm_nacl_amd64p32.s
+++ b/src/pkg/syscall/asm_nacl_amd64p32.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
#include "../runtime/syscall_nacl.h"
//
diff --git a/src/pkg/syscall/asm_nacl_arm.s b/src/pkg/syscall/asm_nacl_arm.s
index ffc48ce..cc4b9cd 100644
--- a/src/pkg/syscall/asm_nacl_arm.s
+++ b/src/pkg/syscall/asm_nacl_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
#include "../runtime/syscall_nacl.h"
//
diff --git a/src/pkg/syscall/asm_netbsd_386.s b/src/pkg/syscall/asm_netbsd_386.s
index 40b30b4..c582632 100644
--- a/src/pkg/syscall/asm_netbsd_386.s
+++ b/src/pkg/syscall/asm_netbsd_386.s
@@ -5,7 +5,7 @@
// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
// so that go vet can check that they are correct.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
//
// System call support for 386, NetBSD
diff --git a/src/pkg/syscall/asm_netbsd_amd64.s b/src/pkg/syscall/asm_netbsd_amd64.s
index 94ad028..8285382 100644
--- a/src/pkg/syscall/asm_netbsd_amd64.s
+++ b/src/pkg/syscall/asm_netbsd_amd64.s
@@ -5,7 +5,7 @@
// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
// so that go vet can check that they are correct.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
//
// System call support for AMD64, NetBSD
diff --git a/src/pkg/syscall/asm_netbsd_arm.s b/src/pkg/syscall/asm_netbsd_arm.s
index 2c0d654..b061180 100644
--- a/src/pkg/syscall/asm_netbsd_arm.s
+++ b/src/pkg/syscall/asm_netbsd_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
//
// System call support for ARM, NetBSD
diff --git a/src/pkg/syscall/asm_openbsd_386.s b/src/pkg/syscall/asm_openbsd_386.s
index 7dd2e37..17fbb65 100644
--- a/src/pkg/syscall/asm_openbsd_386.s
+++ b/src/pkg/syscall/asm_openbsd_386.s
@@ -5,7 +5,7 @@
// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
// so that go vet can check that they are correct.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
//
// System call support for 386, OpenBSD
diff --git a/src/pkg/syscall/asm_openbsd_amd64.s b/src/pkg/syscall/asm_openbsd_amd64.s
index e127bf2..fe61482 100644
--- a/src/pkg/syscall/asm_openbsd_amd64.s
+++ b/src/pkg/syscall/asm_openbsd_amd64.s
@@ -5,7 +5,7 @@
// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
// so that go vet can check that they are correct.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
//
// System call support for AMD64, OpenBSD
diff --git a/src/pkg/syscall/asm_plan9_386.s b/src/pkg/syscall/asm_plan9_386.s
index f8c07c4..aaa8b9a 100644
--- a/src/pkg/syscall/asm_plan9_386.s
+++ b/src/pkg/syscall/asm_plan9_386.s
@@ -5,7 +5,7 @@
// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
// so that go vet can check that they are correct.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
//
// System call support for 386, Plan 9
diff --git a/src/pkg/syscall/asm_plan9_amd64.s b/src/pkg/syscall/asm_plan9_amd64.s
index 220ea68..22dc5f9 100644
--- a/src/pkg/syscall/asm_plan9_amd64.s
+++ b/src/pkg/syscall/asm_plan9_amd64.s
@@ -5,7 +5,7 @@
// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
// so that go vet can check that they are correct.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
//
// System call support for Plan 9
diff --git a/src/pkg/syscall/time_nacl_386.s b/src/pkg/syscall/time_nacl_386.s
index b5a22d3..c0c89dc 100644
--- a/src/pkg/syscall/time_nacl_386.s
+++ b/src/pkg/syscall/time_nacl_386.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·startTimer(SB),NOSPLIT,$0
JMP time·startTimer(SB)
diff --git a/src/pkg/syscall/time_nacl_amd64p32.s b/src/pkg/syscall/time_nacl_amd64p32.s
index b5a22d3..c0c89dc 100644
--- a/src/pkg/syscall/time_nacl_amd64p32.s
+++ b/src/pkg/syscall/time_nacl_amd64p32.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·startTimer(SB),NOSPLIT,$0
JMP time·startTimer(SB)
diff --git a/src/pkg/syscall/time_nacl_arm.s b/src/pkg/syscall/time_nacl_arm.s
index 99baaf5..4f4b4d8 100644
--- a/src/pkg/syscall/time_nacl_arm.s
+++ b/src/pkg/syscall/time_nacl_arm.s
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include "../../cmd/ld/textflag.h"
+#include "textflag.h"
TEXT ·startTimer(SB),NOSPLIT,$0
B time·startTimer(SB)