summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/musl/musl/0001-crt-Add-.file-directive.patch
blob: d2bd587e395c09ff43c0896ab91c7f72212af934 (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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
From b0124f3c4f2a353506621d387135ebea6b8c6609 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 29 Oct 2020 22:40:53 -0700
Subject: [PATCH] crt: Add .file directive

Musl linked binaries come out to be not reproducible because
absolute build path is seen in debug info of crti.o and crtn.o
This is due to the fact that these objects are built from assembly
source files and they are missing .file directive
if we add .file <filename>.s in them then debug info encodes this
value instead of absolute path in debug_line section

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 crt/aarch64/crti.s    | 1 +
 crt/aarch64/crtn.s    | 1 +
 crt/arm/crti.s        | 1 +
 crt/arm/crtn.s        | 1 +
 crt/i386/crti.s       | 1 +
 crt/i386/crtn.s       | 1 +
 crt/microblaze/crti.s | 1 +
 crt/microblaze/crtn.s | 1 +
 crt/mips/crti.s       | 1 +
 crt/mips/crtn.s       | 1 +
 crt/mips64/crti.s     | 1 +
 crt/mips64/crtn.s     | 1 +
 crt/mipsn32/crti.s    | 1 +
 crt/mipsn32/crtn.s    | 1 +
 crt/or1k/crti.s       | 1 +
 crt/or1k/crtn.s       | 1 +
 crt/powerpc/crti.s    | 1 +
 crt/powerpc/crtn.s    | 1 +
 crt/powerpc64/crti.s  | 1 +
 crt/powerpc64/crtn.s  | 1 +
 crt/s390x/crti.s      | 1 +
 crt/s390x/crtn.s      | 1 +
 crt/sh/crti.s         | 1 +
 crt/sh/crtn.s         | 1 +
 crt/x32/crti.s        | 1 +
 crt/x32/crtn.s        | 1 +
 crt/x86_64/crti.s     | 1 +
 crt/x86_64/crtn.s     | 1 +
 28 files changed, 28 insertions(+)

diff --git a/crt/aarch64/crti.s b/crt/aarch64/crti.s
index 775df0ac..0f7c23a9 100644
--- a/crt/aarch64/crti.s
+++ b/crt/aarch64/crti.s
@@ -1,3 +1,4 @@
+.file "crti.s"
 .section .init
 .global _init
 .type _init,%function
diff --git a/crt/aarch64/crtn.s b/crt/aarch64/crtn.s
index 73cab692..d62fc129 100644
--- a/crt/aarch64/crtn.s
+++ b/crt/aarch64/crtn.s
@@ -1,3 +1,4 @@
+.file "crtn.s"
 .section .init
 	ldp x29,x30,[sp],#16
 	ret
diff --git a/crt/arm/crti.s b/crt/arm/crti.s
index 18dc1e41..8df72979 100644
--- a/crt/arm/crti.s
+++ b/crt/arm/crti.s
@@ -1,3 +1,4 @@
+.file "crti.s"
 .syntax unified
 
 .section .init
diff --git a/crt/arm/crtn.s b/crt/arm/crtn.s
index dc020f92..7451355b 100644
--- a/crt/arm/crtn.s
+++ b/crt/arm/crtn.s
@@ -1,3 +1,4 @@
+.file "crtn.s"
 .syntax unified
 
 .section .init
diff --git a/crt/i386/crti.s b/crt/i386/crti.s
index d2682a20..2823fc3b 100644
--- a/crt/i386/crti.s
+++ b/crt/i386/crti.s
@@ -1,3 +1,4 @@
+.file "crti.s"
 .section .init
 .global _init
 _init:
diff --git a/crt/i386/crtn.s b/crt/i386/crtn.s
index f3b61e01..04fb1646 100644
--- a/crt/i386/crtn.s
+++ b/crt/i386/crtn.s
@@ -1,3 +1,4 @@
+.file "crtn.s"
 .section .init
 	add $12,%esp
 	ret
diff --git a/crt/microblaze/crti.s b/crt/microblaze/crti.s
index ed1c2fa4..29ee4733 100644
--- a/crt/microblaze/crti.s
+++ b/crt/microblaze/crti.s
@@ -1,3 +1,4 @@
+.file "crti.s"
 .section .init
 .global _init
 .align 2
diff --git a/crt/microblaze/crtn.s b/crt/microblaze/crtn.s
index 1e02c984..c2083749 100644
--- a/crt/microblaze/crtn.s
+++ b/crt/microblaze/crtn.s
@@ -1,3 +1,4 @@
+.file "crtn.s"
 .section .init
 	lwi r15, r1, 0
 	rtsd r15, 8
diff --git a/crt/mips/crti.s b/crt/mips/crti.s
index 39dee380..0211764e 100644
--- a/crt/mips/crti.s
+++ b/crt/mips/crti.s
@@ -1,3 +1,4 @@
+.file "crti.s"
 .set noreorder
 
 .section .init
diff --git a/crt/mips/crtn.s b/crt/mips/crtn.s
index 506a04b7..606490cf 100644
--- a/crt/mips/crtn.s
+++ b/crt/mips/crtn.s
@@ -1,3 +1,4 @@
+.file "crtn.s"
 .set noreorder
 
 .section .init
diff --git a/crt/mips64/crti.s b/crt/mips64/crti.s
index c962dd09..f2c19cdd 100644
--- a/crt/mips64/crti.s
+++ b/crt/mips64/crti.s
@@ -1,3 +1,4 @@
+.file "crti.s"
 .set noreorder
 
 .section .init
diff --git a/crt/mips64/crtn.s b/crt/mips64/crtn.s
index f3930b24..68903ffa 100644
--- a/crt/mips64/crtn.s
+++ b/crt/mips64/crtn.s
@@ -1,3 +1,4 @@
+.file "crtn.s"
 .set noreorder
 
 .section .init
diff --git a/crt/mipsn32/crti.s b/crt/mipsn32/crti.s
index 14fa28d9..a35387d3 100644
--- a/crt/mipsn32/crti.s
+++ b/crt/mipsn32/crti.s
@@ -1,3 +1,4 @@
+.file "crti.s"
 .set	noreorder
 .section	.init
 .global	_init
diff --git a/crt/mipsn32/crtn.s b/crt/mipsn32/crtn.s
index dccd7e89..bdb6e561 100644
--- a/crt/mipsn32/crtn.s
+++ b/crt/mipsn32/crtn.s
@@ -1,3 +1,4 @@
+.file "crtn.s"
 .set	noreorder
 .section	.init
 	ld	$gp, 16($sp)
diff --git a/crt/or1k/crti.s b/crt/or1k/crti.s
index 7e741459..919369ca 100644
--- a/crt/or1k/crti.s
+++ b/crt/or1k/crti.s
@@ -1,3 +1,4 @@
+.file "crti.s"
 .section .init
 .global _init
 _init:
diff --git a/crt/or1k/crtn.s b/crt/or1k/crtn.s
index 4185a027..d670b327 100644
--- a/crt/or1k/crtn.s
+++ b/crt/or1k/crtn.s
@@ -1,3 +1,4 @@
+.file "crtn.s"
 .section .init
 	l.lwz	r9,0(r1)
 	l.jr	r9
diff --git a/crt/powerpc/crti.s b/crt/powerpc/crti.s
index 60461ca4..b748ca48 100644
--- a/crt/powerpc/crti.s
+++ b/crt/powerpc/crti.s
@@ -1,3 +1,4 @@
+.file "crti.s"
 .section .init
 .align 2
 .global _init
diff --git a/crt/powerpc/crtn.s b/crt/powerpc/crtn.s
index 2d14a6f0..d989e36f 100644
--- a/crt/powerpc/crtn.s
+++ b/crt/powerpc/crtn.s
@@ -1,3 +1,4 @@
+.file "crtn.s"
 .section .init
 .align 2
 	lwz 0,36(1)
diff --git a/crt/powerpc64/crti.s b/crt/powerpc64/crti.s
index 9f712f0e..d3323a67 100644
--- a/crt/powerpc64/crti.s
+++ b/crt/powerpc64/crti.s
@@ -1,3 +1,4 @@
+.file "crti.s"
 .section .init
 .align 2
 .global _init
diff --git a/crt/powerpc64/crtn.s b/crt/powerpc64/crtn.s
index a7a9f4a0..5e71ae66 100644
--- a/crt/powerpc64/crtn.s
+++ b/crt/powerpc64/crtn.s
@@ -1,3 +1,4 @@
+.file "crtn.s"
 .section .init
 .align 2
 	addi 1, 1, 32
diff --git a/crt/s390x/crti.s b/crt/s390x/crti.s
index f453205b..3da3c5e1 100644
--- a/crt/s390x/crti.s
+++ b/crt/s390x/crti.s
@@ -1,3 +1,4 @@
+.file "crti.s"
 .section .init
 .align 2
 .global _init
diff --git a/crt/s390x/crtn.s b/crt/s390x/crtn.s
index 06066dc9..bfd55caf 100644
--- a/crt/s390x/crtn.s
+++ b/crt/s390x/crtn.s
@@ -1,3 +1,4 @@
+.file "crtn.s"
 .section .init
 .align 2
 	lmg  %r14, %r15, 272(%r15)
diff --git a/crt/sh/crti.s b/crt/sh/crti.s
index d99bfd5c..77d61c51 100644
--- a/crt/sh/crti.s
+++ b/crt/sh/crti.s
@@ -1,3 +1,4 @@
+.file "crti.s"
 .section .init
 .global  _init
 .type    _init, @function
diff --git a/crt/sh/crtn.s b/crt/sh/crtn.s
index 958ce951..29deb5be 100644
--- a/crt/sh/crtn.s
+++ b/crt/sh/crtn.s
@@ -1,3 +1,4 @@
+.file "crtn.s"
 .section .init
 	lds.l @r15+, pr
 	mov.l @r15+, r14
diff --git a/crt/x32/crti.s b/crt/x32/crti.s
index 4788968b..8668b7c7 100644
--- a/crt/x32/crti.s
+++ b/crt/x32/crti.s
@@ -1,3 +1,4 @@
+.file "crti.s"
 .section .init
 .global _init
 _init:
diff --git a/crt/x32/crtn.s b/crt/x32/crtn.s
index 29198b77..ef73d295 100644
--- a/crt/x32/crtn.s
+++ b/crt/x32/crtn.s
@@ -1,3 +1,4 @@
+.file "crtn.s"
 .section .init
 	pop %rax
 	ret
diff --git a/crt/x86_64/crti.s b/crt/x86_64/crti.s
index 4788968b..8668b7c7 100644
--- a/crt/x86_64/crti.s
+++ b/crt/x86_64/crti.s
@@ -1,3 +1,4 @@
+.file "crti.s"
 .section .init
 .global _init
 _init:
diff --git a/crt/x86_64/crtn.s b/crt/x86_64/crtn.s
index 29198b77..ef73d295 100644
--- a/crt/x86_64/crtn.s
+++ b/crt/x86_64/crtn.s
@@ -1,3 +1,4 @@
+.file "crtn.s"
 .section .init
 	pop %rax
 	ret
-- 
2.29.1