summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/go/go-1.10/0009-ld-replace-glibc-dynamic-linker-with-musl.patch
blob: 06b00b3cc2d2f9bc447c5ee3b5f95aceb0343f85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
From f575d85c4bd9b2903223d6c0dcc38a12775d582f Mon Sep 17 00:00:00 2001
From: Matt Madison <matt@madison.systems>
Date: Sun, 18 Feb 2018 08:24:05 -0800
Subject: [PATCH 9/9] ld: replace glibc dynamic linker with musl

Rework of patch by Khem Raj <raj.khem@gmail.com>
for go 1.10.  Should be applied conditionally on
musl being the system C library.

Upstream-Status: Inappropriate [Real fix should be portable across libcs]

Signed-off-by: Matt Madison <matt@madison.systems>
---
 src/cmd/link/internal/amd64/obj.go  | 2 +-
 src/cmd/link/internal/arm/obj.go    | 2 +-
 src/cmd/link/internal/arm64/obj.go  | 2 +-
 src/cmd/link/internal/mips/obj.go   | 2 +-
 src/cmd/link/internal/mips64/obj.go | 2 +-
 src/cmd/link/internal/ppc64/obj.go  | 2 +-
 src/cmd/link/internal/s390x/obj.go  | 2 +-
 src/cmd/link/internal/x86/obj.go    | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/cmd/link/internal/amd64/obj.go b/src/cmd/link/internal/amd64/obj.go
index 87e809166a..f522a63034 100644
--- a/src/cmd/link/internal/amd64/obj.go
+++ b/src/cmd/link/internal/amd64/obj.go
@@ -62,7 +62,7 @@ func Init() (*sys.Arch, ld.Arch) {
 		PEreloc1:         pereloc1,
 		TLSIEtoLE:        tlsIEtoLE,
 
-		Linuxdynld:     "/lib64/ld-linux-x86-64.so.2",
+		Linuxdynld:     "/lib64/ld-musl-x86-64.so.1",
 		Freebsddynld:   "/libexec/ld-elf.so.1",
 		Openbsddynld:   "/usr/libexec/ld.so",
 		Netbsddynld:    "/libexec/ld.elf_so",
diff --git a/src/cmd/link/internal/arm/obj.go b/src/cmd/link/internal/arm/obj.go
index da16f92345..fd14940ede 100644
--- a/src/cmd/link/internal/arm/obj.go
+++ b/src/cmd/link/internal/arm/obj.go
@@ -58,7 +58,7 @@ func Init() (*sys.Arch, ld.Arch) {
 		Gentext:          gentext,
 		Machoreloc1:      machoreloc1,
 
-		Linuxdynld:     "/lib/ld-linux.so.3", // 2 for OABI, 3 for EABI
+		Linuxdynld:     "/lib/ld-musl-armhf.so.1",
 		Freebsddynld:   "/usr/libexec/ld-elf.so.1",
 		Openbsddynld:   "/usr/libexec/ld.so",
 		Netbsddynld:    "/libexec/ld.elf_so",
diff --git a/src/cmd/link/internal/arm64/obj.go b/src/cmd/link/internal/arm64/obj.go
index 6b386ad737..99863712cc 100644
--- a/src/cmd/link/internal/arm64/obj.go
+++ b/src/cmd/link/internal/arm64/obj.go
@@ -57,7 +57,7 @@ func Init() (*sys.Arch, ld.Arch) {
 		Gentext:          gentext,
 		Machoreloc1:      machoreloc1,
 
-		Linuxdynld: "/lib/ld-linux-aarch64.so.1",
+		Linuxdynld: "/lib/ld-musl-aarch64.so.1",
 
 		Freebsddynld:   "XXX",
 		Openbsddynld:   "XXX",
diff --git a/src/cmd/link/internal/mips/obj.go b/src/cmd/link/internal/mips/obj.go
index c5d3451c39..fd85e6368d 100644
--- a/src/cmd/link/internal/mips/obj.go
+++ b/src/cmd/link/internal/mips/obj.go
@@ -60,7 +60,7 @@ func Init() (*sys.Arch, ld.Arch) {
 		Gentext:          gentext,
 		Machoreloc1:      machoreloc1,
 
-		Linuxdynld: "/lib/ld.so.1",
+		Linuxdynld: "/lib/ld-musl-mipsle.so.1",
 
 		Freebsddynld:   "XXX",
 		Openbsddynld:   "XXX",
diff --git a/src/cmd/link/internal/mips64/obj.go b/src/cmd/link/internal/mips64/obj.go
index 83974e5b56..097224f6da 100644
--- a/src/cmd/link/internal/mips64/obj.go
+++ b/src/cmd/link/internal/mips64/obj.go
@@ -59,7 +59,7 @@ func Init() (*sys.Arch, ld.Arch) {
 		Gentext:          gentext,
 		Machoreloc1:      machoreloc1,
 
-		Linuxdynld:     "/lib64/ld64.so.1",
+		Linuxdynld:     "/lib64/ld-musl-mips64le.so.1",
 		Freebsddynld:   "XXX",
 		Openbsddynld:   "XXX",
 		Netbsddynld:    "XXX",
diff --git a/src/cmd/link/internal/ppc64/obj.go b/src/cmd/link/internal/ppc64/obj.go
index 273d9b42cb..a503abe8ea 100644
--- a/src/cmd/link/internal/ppc64/obj.go
+++ b/src/cmd/link/internal/ppc64/obj.go
@@ -62,7 +62,7 @@ func Init() (*sys.Arch, ld.Arch) {
 		Machoreloc1:      machoreloc1,
 
 		// TODO(austin): ABI v1 uses /usr/lib/ld.so.1,
-		Linuxdynld: "/lib64/ld64.so.1",
+		Linuxdynld: "/lib64/ld-musl-powerpc64le.so.1",
 
 		Freebsddynld:   "XXX",
 		Openbsddynld:   "XXX",
diff --git a/src/cmd/link/internal/s390x/obj.go b/src/cmd/link/internal/s390x/obj.go
index 9ac7eb8217..3825ff7abe 100644
--- a/src/cmd/link/internal/s390x/obj.go
+++ b/src/cmd/link/internal/s390x/obj.go
@@ -57,7 +57,7 @@ func Init() (*sys.Arch, ld.Arch) {
 		Gentext:          gentext,
 		Machoreloc1:      machoreloc1,
 
-		Linuxdynld: "/lib64/ld64.so.1",
+		Linuxdynld: "/lib64/ld-musl-s390x.so.1",
 
 		// not relevant for s390x
 		Freebsddynld:   "XXX",
diff --git a/src/cmd/link/internal/x86/obj.go b/src/cmd/link/internal/x86/obj.go
index 6a744dc04e..d81f392549 100644
--- a/src/cmd/link/internal/x86/obj.go
+++ b/src/cmd/link/internal/x86/obj.go
@@ -58,7 +58,7 @@ func Init() (*sys.Arch, ld.Arch) {
 		Machoreloc1:      machoreloc1,
 		PEreloc1:         pereloc1,
 
-		Linuxdynld:   "/lib/ld-linux.so.2",
+		Linuxdynld:   "/lib/ld-musl-i386.so.1",
 		Freebsddynld: "/usr/libexec/ld-elf.so.1",
 		Openbsddynld: "/usr/libexec/ld.so",
 		Netbsddynld:  "/usr/libexec/ld.elf_so",
-- 
2.14.1