Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-boot/gnu-efi/files/
Date: Mon, 11 May 2020 18:41:50
Message-Id: 1589222496.5fa0b2ba282d61c2b6d98493a03eb1564cd6d18b.floppym@gentoo
1 commit: 5fa0b2ba282d61c2b6d98493a03eb1564cd6d18b
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Mon May 11 17:01:54 2020 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Mon May 11 18:41:36 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5fa0b2ba
7
8 sys-boot/gnu-efi: remove unused patches
9
10 Package-Manager: Portage-2.3.99, Repoman-2.3.22
11 Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
12 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
13 Closes: https://github.com/gentoo/gentoo/pull/15752
14
15 .../files/gnu-efi-3.0.6-ia64-gnu-hash.patch | 149 -------------------
16 .../gnu-efi/files/gnu-efi-3.0.6-ia64-setjmp.patch | 163 ---------------------
17 2 files changed, 312 deletions(-)
18
19 diff --git a/sys-boot/gnu-efi/files/gnu-efi-3.0.6-ia64-gnu-hash.patch b/sys-boot/gnu-efi/files/gnu-efi-3.0.6-ia64-gnu-hash.patch
20 deleted file mode 100644
21 index 9487ba4c673..00000000000
22 --- a/sys-boot/gnu-efi/files/gnu-efi-3.0.6-ia64-gnu-hash.patch
23 +++ /dev/null
24 @@ -1,149 +0,0 @@
25 -https://sourceforge.net/p/gnu-efi/code/merge-requests/1/
26 -
27 -From 2cc0b085fb82e80d43cc08c8376dff9f9532a72d Mon Sep 17 00:00:00 2001
28 -From: Sergei Trofimovich <slyfox@g.o>
29 -Date: Sat, 27 Jan 2018 20:29:05 +0000
30 -Subject: [PATCH] gnuefi: preserve .gnu.hash sections (unbreaks elilo on IA-64)
31 -
32 -Gentoo has slightly modified linker defaults: --hash-style=gnu
33 -This means all ELF files in system have '.gnu.hash' section
34 -but no '.hash' section.
35 -
36 -gnuefi's ldscript did not account for it and as a result
37 -one symbol 'ImageBase' did not resolve locally for elilo.so
38 -and caused 'elilo' to fail to load by ia64 EFI:
39 - Loading.: Gentoo (try new elilo)
40 - ImageAddress: pointer is outside of image
41 - ImageAddress: pointer is outside of image
42 -
43 -Those two relocations come from crt0-efi-ia64.S PE32 entry point
44 -fdescr:
45 -
46 -```
47 - #define IMAGE_REL_BASED_DIR64<->10
48 - .section .reloc, "a"
49 - data4 _start_plabel // Page RVA
50 - data4 12 // Block Size (2*4+2*2)
51 - data2 (IMAGE_REL_BASED_DIR64<<12) + 0 // reloc for plabel's entry point
52 - data2 (IMAGE_REL_BASED_DIR64<<12) + 8 // reloc for plabel's global pointer
53 -```
54 -
55 -These refer ImageBase.
56 -
57 -The change adds '.gnu.hash' collection (follows existing '.hash'
58 -collection).
59 -
60 -Tested on IA-64 by successfully booting elilo-3.16.
61 -
62 -Bug: https://bugs.gentoo.org/575300
63 -Signed-off-by: Sergei Trofimovich <slyfox@g.o>
64 ----
65 - README.gnuefi | 8 +++++++-
66 - gnuefi/elf_ia32_efi.lds | 4 +++-
67 - gnuefi/elf_ia32_fbsd_efi.lds | 4 +++-
68 - gnuefi/elf_ia64_efi.lds | 4 +++-
69 - gnuefi/elf_x86_64_efi.lds | 4 +++-
70 - gnuefi/elf_x86_64_fbsd_efi.lds | 4 +++-
71 - 6 files changed, 22 insertions(+), 6 deletions(-)
72 -
73 -diff --git a/README.gnuefi b/README.gnuefi
74 -index a7feec0..512698c 100644
75 ---- a/README.gnuefi
76 -+++ b/README.gnuefi
77 -@@ -231,11 +231,17 @@ and page sized.These eight sections are used to group together the much
78 - greater number of sections that are typically present in ELF object files.
79 - Specifically:
80 -
81 -- .hash
82 -+ .hash (and/or .gnu.hash)
83 - Collects the ELF .hash info (this section _must_ be the first
84 - section in order to build a shared object file; the section is
85 - not actually loaded or used at runtime).
86 -
87 -+ GNU binutils provides a mechanism to generate different hash info
88 -+ via --hash-style=<sysv|gnu|both> option. In this case output
89 -+ shared object will contain .hash section, .gnu.hash section or
90 -+ both. In order to generate correct output linker script preserves
91 -+ both types of hash sections.
92 -+
93 - .text
94 - Collects all sections containing executable code.
95 -
96 -diff --git a/gnuefi/elf_ia32_efi.lds b/gnuefi/elf_ia32_efi.lds
97 -index 6cc4ce1..f27fe5f 100644
98 ---- a/gnuefi/elf_ia32_efi.lds
99 -+++ b/gnuefi/elf_ia32_efi.lds
100 -@@ -5,7 +5,9 @@ SECTIONS
101 - {
102 - . = 0;
103 - ImageBase = .;
104 -- .hash : { *(.hash) } /* this MUST come first! */
105 -+ /* .hash and/or .gnu.hash MUST come first! */
106 -+ .hash : { *(.hash) }
107 -+ .gnu.hash : { *(.gnu.hash) }
108 - . = ALIGN(4096);
109 - .text :
110 - {
111 -diff --git a/gnuefi/elf_ia32_fbsd_efi.lds b/gnuefi/elf_ia32_fbsd_efi.lds
112 -index 77d6fad..cd309e2 100644
113 ---- a/gnuefi/elf_ia32_fbsd_efi.lds
114 -+++ b/gnuefi/elf_ia32_fbsd_efi.lds
115 -@@ -5,7 +5,9 @@ SECTIONS
116 - {
117 - . = 0;
118 - ImageBase = .;
119 -- .hash : { *(.hash) } /* this MUST come first! */
120 -+ /* .hash and/or .gnu.hash MUST come first! */
121 -+ .hash : { *(.hash) }
122 -+ .gnu.hash : { *(.gnu.hash) }
123 - . = ALIGN(4096);
124 - .text :
125 - {
126 -diff --git a/gnuefi/elf_ia64_efi.lds b/gnuefi/elf_ia64_efi.lds
127 -index baca962..190792a 100644
128 ---- a/gnuefi/elf_ia64_efi.lds
129 -+++ b/gnuefi/elf_ia64_efi.lds
130 -@@ -5,7 +5,9 @@ SECTIONS
131 - {
132 - . = 0;
133 - ImageBase = .;
134 -- .hash : { *(.hash) } /* this MUST come first! */
135 -+ /* .hash and/or .gnu.hash MUST come first! */
136 -+ .hash : { *(.hash) }
137 -+ .gnu.hash : { *(.gnu.hash) }
138 - . = ALIGN(4096);
139 - .text :
140 - {
141 -diff --git a/gnuefi/elf_x86_64_efi.lds b/gnuefi/elf_x86_64_efi.lds
142 -index 942d1f3..7be5902 100644
143 ---- a/gnuefi/elf_x86_64_efi.lds
144 -+++ b/gnuefi/elf_x86_64_efi.lds
145 -@@ -6,7 +6,9 @@ SECTIONS
146 - {
147 - . = 0;
148 - ImageBase = .;
149 -- .hash : { *(.hash) } /* this MUST come first! */
150 -+ /* .hash and/or .gnu.hash MUST come first! */
151 -+ .hash : { *(.hash) }
152 -+ .gnu.hash : { *(.gnu.hash) }
153 - . = ALIGN(4096);
154 - .eh_frame :
155 - {
156 -diff --git a/gnuefi/elf_x86_64_fbsd_efi.lds b/gnuefi/elf_x86_64_fbsd_efi.lds
157 -index 6fd2031..fe1f334 100644
158 ---- a/gnuefi/elf_x86_64_fbsd_efi.lds
159 -+++ b/gnuefi/elf_x86_64_fbsd_efi.lds
160 -@@ -6,7 +6,9 @@ SECTIONS
161 - {
162 - . = 0;
163 - ImageBase = .;
164 -- .hash : { *(.hash) } /* this MUST come first! */
165 -+ /* .hash and/or .gnu.hash MUST come first! */
166 -+ .hash : { *(.hash) }
167 -+ .gnu.hash : { *(.gnu.hash) }
168 - . = ALIGN(4096);
169 - .eh_frame :
170 - {
171 ---
172 -2.16.1
173 -
174
175 diff --git a/sys-boot/gnu-efi/files/gnu-efi-3.0.6-ia64-setjmp.patch b/sys-boot/gnu-efi/files/gnu-efi-3.0.6-ia64-setjmp.patch
176 deleted file mode 100644
177 index b0964426500..00000000000
178 --- a/sys-boot/gnu-efi/files/gnu-efi-3.0.6-ia64-setjmp.patch
179 +++ /dev/null
180 @@ -1,163 +0,0 @@
181 -https://sourceforge.net/p/gnu-efi/code/merge-requests/2/
182 -
183 -From 0e6995a96b0f5867c8d85fbd251cfbc295a3fc4d Mon Sep 17 00:00:00 2001
184 -From: Sergei Trofimovich <slyfox@g.o>
185 -Date: Sun, 28 Jan 2018 16:44:21 +0000
186 -Subject: [PATCH] gnu-efi: fix lib/ia64/setjmp.S IA-64 build failure
187 -
188 -The build failed as:
189 - lib/ia64/setjmp.S:171: Error: Unknown opcode `ldf.nt1 f26=[r10],8'
190 - lib/ia64/setjmp.S:178: Error: Operand 1 of `ldf.fill.nt1' should be a floating-point register
191 -
192 -The change syncs longjmp definition with
193 - edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/setjmp.s
194 -pulling in:
195 -- branch in the end of function
196 -- registers used wrong instruction for float restore
197 -
198 -Signed-off-by: Sergei Trofimovich <slyfox@g.o>
199 ----
200 - lib/ia64/setjmp.S | 61 +++++++++++++++++++++++++++----------------------------
201 - 1 file changed, 30 insertions(+), 31 deletions(-)
202 -
203 -diff --git a/lib/ia64/setjmp.S b/lib/ia64/setjmp.S
204 -index c806fbc..bbb29d8 100644
205 ---- a/lib/ia64/setjmp.S
206 -+++ b/lib/ia64/setjmp.S
207 -@@ -16,11 +16,11 @@ BASIS,
208 - .globl setjmp
209 - .type setjmp, @function
210 - setjmp:
211 -- alloc loc = ar.pfs, 1, 2, 1, 0
212 -+ alloc loc0 = ar.pfs, 1, 2, 1, 0
213 - ;;
214 - mov r14 = ar.unat
215 - mov r15 = ar.bsp
216 -- add r10 = 0x10 * 20, in0
217 -+ add r10 = 0x10*20, in0
218 - ;;
219 - stf.spill.nta [in0] = f2, 0x10
220 - st8.spill.nta [r10] = r4, 8
221 -@@ -98,29 +98,25 @@ setjmp:
222 -
223 - .globl longjmp
224 - .type longjmp, @function
225 -- .regstk
226 -+ .regstk 2, 0, 0, 0
227 - longjmp:
228 -- add r10 = 0x10 * 20 + 8*14, in0
229 -- movl r2 = ~(((1<<14) - 1) << 16) | 3)
230 -+ add r10 = 0x10*20 + 8*14, in0
231 -+ movl r2 = ~((((1<<14) - 1) << 16) | 3)
232 - ;;
233 - ld8.nt1 r14 = [r10], -8*2
234 - mov r15 = ar.bspstore
235 - ;;
236 - ld8.nt1 r17 = [r10], -8
237 - mov r16 = ar.rsc
238 -- cmp.leu p6 = r14, r15
239 -+ cmp.leu p6 = r14, r15
240 - ;;
241 - ld8.nt1 r18 = [r10], -8
242 - ld8.nt1 r25 = [r10], -8
243 -- and r2 = r16, r2
244 -+ and r2 = r16, r2
245 - ;;
246 -- ldf.fill.nt1 f2 = [in0], 0x10
247 -+ ldf.fill.nt1 f2 = [in0], 0x10
248 - ld8.nt1 r24 = [r10], -8
249 -- mov b5 = r25
250 -- ;;
251 -- mov ar.rsc = r2
252 -- ld8.nt1 r23 = [r10], -8
253 -- mov b5 = r25
254 -+ mov b5 = r25
255 - ;;
256 - mov ar.rsc = r2
257 - ld8.nt1 r23 = [r10], -8
258 -@@ -137,51 +133,51 @@ _skip_flushrs:
259 - mov r31 = ar.rnat
260 - loadrs
261 - ;;
262 -- ldf.fill.nt1 f4 = [in0], 0x10
263 -+ ldf.fill.nt1 f4 = [in0], 0x10
264 - ld8.nt1 r22 = [r10], -8
265 -- dep r2 = -1, r14, 3, 6
266 -+ dep r2 = -1, r14, 3, 6
267 - ;;
268 -- ldf.fill.nt1 f5 = [in0], 0x10
269 -- ld8.nt1 f21 = [r10], -8
270 -- cmp p6 = r2, r15
271 -+ ldf.fill.nt1 f5 = [in0], 0x10
272 -+ ld8.nt1 r21 = [r10], -8
273 -+ cmp.ltu p6 = r2, r15
274 - ;;
275 - ld8.nt1 r20 = [r10], -0x10
276 - (p6) ld8.nta r31 = [r2]
277 -- mov b3 = r23
278 -+ mov b3 = r23
279 - ;;
280 - ldf.fill.nt1 f16 = [in0], 0x10
281 -- ld8.fill.nt1 r7 = [r10], -8
282 -- mov b2 = r22
283 -+ ld8.fill.nt1 r7 = [r10], -8
284 -+ mov b2 = r22
285 - ;;
286 - ldf.fill.nt1 f17 = [in0], 0x10
287 -- ld8.fill.nt1 r6 = [r10], -8
288 -- mov b1 = r21
289 -+ ld8.fill.nt1 r6 = [r10], -8
290 -+ mov b1 = r21
291 - ;;
292 - ldf.fill.nt1 f18 = [in0], 0x10
293 -- ld8.fill.nt1 r5 = [r10], -8
294 -- mov b0 = r20
295 -+ ld8.fill.nt1 r5 = [r10], -8
296 -+ mov b0 = r20
297 - ;;
298 - ldf.fill.nt1 f19 = [in0], 0x10
299 -- ld8.fill.nt1 r4 = [r10], 8*13
300 -+ ld8.fill.nt1 r4 = [r10], 8*13
301 - ;;
302 - ldf.fill.nt1 f20 = [in0], 0x10
303 - ld8.nt1 r19 = [r10], 0x10
304 - ;;
305 - ldf.fill.nt1 f21 = [in0], 0x10
306 -- ldf.nt1 f26 = [r10], 8
307 -+ ld8.nt1 r26 = [r10], 8
308 - mov ar.pfs = r19
309 - ;;
310 - ldf.fill.nt1 f22 = [in0], 0x10
311 - ld8.nt1 r27 = [r10], 8
312 -- mov pr = r26, -1
313 -+ mov pr = r26, -1
314 - ;;
315 -- ldf.fill.nt1 r23 = [in0], 0x10
316 -+ ldf.fill.nt1 f23 = [in0], 0x10
317 - ld8.nt1 r28 = [r10], -17*8 - 0x10
318 - mov ar.lc = r27
319 - ;;
320 - ldf.fill.nt1 f24 = [in0], 0x10
321 - ldf.fill.nt1 f25 = [in0], 0x10
322 -- mov r8 = in1
323 -+ mov r8 = in1
324 - ;;
325 - ldf.fill.nt1 f26 = [in0], 0x10
326 - ldf.fill.nt1 f31 = [r10], -0x10
327 -@@ -192,9 +188,12 @@ _skip_flushrs:
328 - ldf.fill.nt1 f28 = [in0]
329 - ldf.fill.nt1 f29 = [r10], 0x10*3 + 8*4
330 - ;;
331 -- ld8.fill.nt1 sp = [r10]
332 -+ ld8.fill.nt1 sp = [r10]
333 - mov ar.unat = r18
334 - ;;
335 - mov ar.bspstore = r14
336 - mov ar.rnat = r31
337 - ;;
338 -+ invala
339 -+ mov ar.rsc = r16
340 -+ br.ret.sptk b0
341 ---
342 -2.16.1
343 -