summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc/0026-inject-file-assembly-directives.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glibc/glibc/0026-inject-file-assembly-directives.patch')
-rw-r--r--meta/recipes-core/glibc/glibc/0026-inject-file-assembly-directives.patch240
1 files changed, 240 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/0026-inject-file-assembly-directives.patch b/meta/recipes-core/glibc/glibc/0026-inject-file-assembly-directives.patch
new file mode 100644
index 0000000000..89eef82e1b
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0026-inject-file-assembly-directives.patch
@@ -0,0 +1,240 @@
1From cf043d56638883157dbfaa8c6a8e2f63a6f66280 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 29 Nov 2018 17:29:35 -0800
4Subject: [PATCH 26/29] inject file assembly directives
5
6Currently, non-IA builds are not reproducibile since build paths are
7being injected into the debug symbols. These are coming from the use of
8.S assembler files during the glibc build. No STT_FILE section is added
9during the assembly but when linking, ld decides to add one to aid
10debugging and ensure references between the different object files its
11linking remain clear.
12
13We can avoid this by injecting a file header into the assembler files
14ahead of time, choosing a filename which does not contain build system
15paths.
16
17This is a bit of a workaround/hack but does significantly reduce the
18build system references in target binaries for the non-IA architectures
19which use .S files.
20
21RP
222018/10/3
23
24Upstream-Status: Pending
25
26Signed-off-by: Khem Raj <raj.khem@gmail.com>
27---
28 csu/abi-note.c | 2 ++
29 sysdeps/aarch64/crti.S | 2 ++
30 sysdeps/aarch64/crtn.S | 1 +
31 sysdeps/aarch64/dl-tlsdesc.S | 2 ++
32 sysdeps/aarch64/dl-trampoline.S | 2 ++
33 sysdeps/aarch64/start.S | 2 ++
34 sysdeps/arm/crti.S | 2 ++
35 sysdeps/arm/crtn.S | 2 ++
36 sysdeps/arm/dl-tlsdesc.S | 2 ++
37 sysdeps/arm/dl-trampoline.S | 2 ++
38 sysdeps/arm/start.S | 2 ++
39 sysdeps/mips/start.S | 2 ++
40 sysdeps/powerpc/powerpc32/dl-start.S | 2 ++
41 sysdeps/powerpc/powerpc32/start.S | 2 ++
42 sysdeps/powerpc/powerpc64/start.S | 2 ++
43 sysdeps/unix/sysv/linux/aarch64/__read_tp.S | 2 ++
44 sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S | 2 ++
45 sysdeps/unix/sysv/linux/arm/libc-do-syscall.S | 2 ++
46 sysdeps/unix/sysv/linux/powerpc/dl-brk.S | 2 ++
47 19 files changed, 37 insertions(+)
48
49--- a/sysdeps/aarch64/crti.S
50+++ b/sysdeps/aarch64/crti.S
51@@ -50,6 +50,8 @@
52 # define PREINIT_FUNCTION_WEAK 1
53 #endif
54
55+ .file "crti.S"
56+
57 #if PREINIT_FUNCTION_WEAK
58 weak_extern (PREINIT_FUNCTION)
59 #else
60--- a/sysdeps/aarch64/crtn.S
61+++ b/sysdeps/aarch64/crtn.S
62@@ -38,6 +38,7 @@
63 corresponding to the prologues in crti.S. */
64
65 #include <sysdep.h>
66+ .file "crtn.S"
67
68 .section .init,"ax",%progbits
69 ldp x29, x30, [sp], 16
70--- a/sysdeps/aarch64/dl-tlsdesc.S
71+++ b/sysdeps/aarch64/dl-tlsdesc.S
72@@ -22,6 +22,8 @@
73 #include <tls.h>
74 #include "tlsdesc.h"
75
76+ .file "dl-tlsdesc.S"
77+
78 #define NSAVEDQREGPAIRS 16
79 #define SAVE_Q_REGISTERS \
80 stp q0, q1, [sp, #-32*NSAVEDQREGPAIRS]!; \
81--- a/sysdeps/aarch64/dl-trampoline.S
82+++ b/sysdeps/aarch64/dl-trampoline.S
83@@ -21,6 +21,8 @@
84
85 #include "dl-link.h"
86
87+ .file "dl-trampoline.S"
88+
89 #define ip0 x16
90 #define ip0l PTR_REG (16)
91 #define ip1 x17
92--- a/sysdeps/aarch64/start.S
93+++ b/sysdeps/aarch64/start.S
94@@ -18,6 +18,8 @@
95
96 #include <sysdep.h>
97
98+ .file "start.S"
99+
100 /* This is the canonical entry point, usually the first thing in the text
101 segment.
102
103--- a/sysdeps/arm/crti.S
104+++ b/sysdeps/arm/crti.S
105@@ -57,6 +57,8 @@
106 .hidden PREINIT_FUNCTION
107 #endif
108
109+ .file "crti.S"
110+
111 #if PREINIT_FUNCTION_WEAK
112 .p2align 2
113 .type call_weak_fn, %function
114--- a/sysdeps/arm/crtn.S
115+++ b/sysdeps/arm/crtn.S
116@@ -37,6 +37,8 @@
117 #define NO_THUMB
118 #include <sysdep.h>
119
120+ .file "crtn.S"
121+
122 /* crtn.S puts function epilogues in the .init and .fini sections
123 corresponding to the prologues in crti.S. */
124
125--- a/sysdeps/arm/dl-tlsdesc.S
126+++ b/sysdeps/arm/dl-tlsdesc.S
127@@ -21,6 +21,8 @@
128 #include <tls.h>
129 #include "tlsdesc.h"
130
131+ .file "dl-tlsdesc.S"
132+
133 .text
134 @ emit debug information with cfi
135 @ use arm-specific pseudos for unwinding itself
136--- a/sysdeps/arm/dl-trampoline.S
137+++ b/sysdeps/arm/dl-trampoline.S
138@@ -21,6 +21,8 @@
139 #include <sysdep.h>
140 #include <libc-symbols.h>
141
142+ .file "dl-trampoline.S"
143+
144 .text
145 .globl _dl_runtime_resolve
146 .type _dl_runtime_resolve, #function
147--- a/sysdeps/arm/start.S
148+++ b/sysdeps/arm/start.S
149@@ -57,6 +57,8 @@
150 NULL
151 */
152
153+ .file "start.S"
154+
155 /* Tag_ABI_align8_preserved: This code preserves 8-byte
156 alignment in any callee. */
157 .eabi_attribute 25, 1
158--- a/sysdeps/mips/start.S
159+++ b/sysdeps/mips/start.S
160@@ -38,6 +38,8 @@
161 #include <sgidefs.h>
162 #include <sys/asm.h>
163
164+ .file "start.S"
165+
166 #ifndef ENTRY_POINT
167 #error ENTRY_POINT needs to be defined for start.S on MIPS/ELF.
168 #endif
169--- a/sysdeps/powerpc/powerpc32/dl-start.S
170+++ b/sysdeps/powerpc/powerpc32/dl-start.S
171@@ -18,6 +18,8 @@
172
173 #include <sysdep.h>
174
175+ .file "dl-start.S"
176+
177 /* Initial entry point code for the dynamic linker.
178 The C function `_dl_start' is the real entry point;
179 its return value is the user program's entry point. */
180--- a/sysdeps/powerpc/powerpc32/start.S
181+++ b/sysdeps/powerpc/powerpc32/start.S
182@@ -35,6 +35,8 @@
183
184 #include <sysdep.h>
185
186+ .file "start.S"
187+
188 /* We do not want .eh_frame info for crt1.o since crt1.o is linked
189 before crtbegin.o, the file defining __EH_FRAME_BEGIN__. */
190 #undef cfi_startproc
191--- a/sysdeps/powerpc/powerpc64/start.S
192+++ b/sysdeps/powerpc/powerpc64/start.S
193@@ -35,6 +35,8 @@
194
195 #include <sysdep.h>
196
197+ .file "start.S"
198+
199 /* We do not want .eh_frame info for crt1.o since crt1.o is linked
200 before crtbegin.o, the file defining __EH_FRAME_BEGIN__. */
201 #undef cfi_startproc
202--- a/sysdeps/unix/sysv/linux/aarch64/__read_tp.S
203+++ b/sysdeps/unix/sysv/linux/aarch64/__read_tp.S
204@@ -18,6 +18,8 @@
205
206 #include <sysdep.h>
207
208+ .file "__read_tp.S"
209+
210 .hidden __read_tp
211 ENTRY (__read_tp)
212 mrs x0, tpidr_el0
213--- a/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S
214+++ b/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S
215@@ -39,6 +39,8 @@
216 a normal function call) in a high page of memory; tail call to the
217 helper. */
218
219+ .file "aeabi_read_tp.S"
220+
221 .hidden __aeabi_read_tp
222 ENTRY (__aeabi_read_tp)
223 #ifdef ARCH_HAS_HARD_TP
224--- a/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S
225+++ b/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S
226@@ -27,6 +27,8 @@
227 ARM unwind tables for register to register moves, the actual opcodes
228 are not defined. */
229
230+ .file "libc-do-syscall.S"
231+
232 #if defined(__thumb__)
233 .thumb
234 .syntax unified
235--- a/sysdeps/unix/sysv/linux/powerpc/dl-brk.S
236+++ b/sysdeps/unix/sysv/linux/powerpc/dl-brk.S
237@@ -1 +1,3 @@
238+ .file "dl-brk.S"
239+
240 #include <brk.S>