File tree 9 files changed +476
-0
lines changed 9 files changed +476
-0
lines changed Original file line number Diff line number Diff line change
1
+ All no-pic patches were based upon:
2
+ https://raw.githubusercontent.com/docker-library/golang/master/1.6/alpine/no-pic.patch
3
+ https://raw.githubusercontent.com/docker-library/golang/master/1.7/alpine/no-pic.patch
4
+
5
+ go1.4/no-pic.patch was hand-crafted from the above, based upon:
6
+ https://go.googlesource.com/go/+/go1.4.3/src/cmd/ld/lib.c
Original file line number Diff line number Diff line change
1
+ diff --git a/src/cmd/ld/lib.c b/src/cmd/ld/lib.c
2
+ --- a/src/cmd/ld/lib.c
3
+ +++ b/src/cmd/ld/lib.c
4
+ @@ -692,6 +692,11 @@ hostlink(void) {
5
+ p = strchr(p + 1, ' ');
6
+ }
7
+
8
+ + // The Go linker does not currently support building PIE
9
+ + // executables when using the external linker. See:
10
+ + // https://github.com/golang/go/issues/6940
11
+ + argv[argc++] = "-fno-PIC";
12
+ +
13
+ argv[argc] = nil;
14
+
15
+ quotefmtinstall();
Original file line number Diff line number Diff line change
1
+ diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
2
+ --- a/src/cmd/link/internal/ld/lib.go
3
+ +++ b/src/cmd/link/internal/ld/lib.go
4
+ @@ -1071,6 +1071,11 @@ func hostlink() {
5
+ argv = append(argv, peimporteddlls()...)
6
+ }
7
+
8
+ + // The Go linker does not currently support building PIE
9
+ + // executables when using the external linker. See:
10
+ + // https://github.com/golang/go/issues/6940
11
+ + argv = append(argv, "-fno-PIC")
12
+ +
13
+ if Debug['v'] != 0 {
14
+ fmt.Fprintf(&Bso, "host link:")
15
+ for _, v := range argv {
Original file line number Diff line number Diff line change
1
+ diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
2
+ index 8ccbec9dd634..4e96bfadc260 100644
3
+ --- a/src/cmd/link/internal/ld/lib.go
4
+ +++ b/src/cmd/link/internal/ld/lib.go
5
+ @@ -1194,6 +1194,11 @@ func hostlink() {
6
+ argv = append(argv, peimporteddlls()...)
7
+ }
8
+
9
+ + // The Go linker does not currently support building PIE
10
+ + // executables when using the external linker. See:
11
+ + // https://github.com/golang/go/issues/6940
12
+ + argv = append(argv, "-fno-PIC")
13
+ +
14
+ if Debug['v'] != 0 {
15
+ fmt.Fprintf(&Bso, "host link:")
16
+ for _, v := range argv {
Original file line number Diff line number Diff line change
1
+ diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
2
+ index 14f4fa9..5599307 100644
3
+ --- a/src/cmd/link/internal/ld/lib.go
4
+ +++ b/src/cmd/link/internal/ld/lib.go
5
+ @@ -1272,6 +1272,11 @@ func hostlink() {
6
+ argv = append(argv, peimporteddlls()...)
7
+ }
8
+
9
+ + // The Go linker does not currently support building PIE
10
+ + // executables when using the external linker. See:
11
+ + // https://github.com/golang/go/issues/6940
12
+ + argv = append(argv, "-fno-PIC")
13
+ +
14
+ if Debug['v'] != 0 {
15
+ fmt.Fprintf(Bso, "host link:")
16
+ for _, v := range argv {
Original file line number Diff line number Diff line change
1
+ diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
2
+ index 14f4fa9..5599307 100644
3
+ --- a/src/cmd/link/internal/ld/lib.go
4
+ +++ b/src/cmd/link/internal/ld/lib.go
5
+ @@ -1272,6 +1272,11 @@ func hostlink() {
6
+ argv = append(argv, peimporteddlls()...)
7
+ }
8
+
9
+ + // The Go linker does not currently support building PIE
10
+ + // executables when using the external linker. See:
11
+ + // https://github.com/golang/go/issues/6940
12
+ + argv = append(argv, "-fno-PIC")
13
+ +
14
+ if Debug['v'] != 0 {
15
+ fmt.Fprintf(Bso, "host link:")
16
+ for _, v := range argv {
You can’t perform that action at this time.
0 commit comments