1 |
vapier 10/09/30 00:03:25 |
2 |
|
3 |
Added: 6230_all_arm-glibc-hardened.patch |
4 |
Log: |
5 |
fix by David Lamparter for building on hardened/arm systems #336914 |
6 |
|
7 |
Revision Changes Path |
8 |
1.1 src/patchsets/glibc/2.12.1/ports/6230_all_arm-glibc-hardened.patch |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.12.1/ports/6230_all_arm-glibc-hardened.patch?rev=1.1&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.12.1/ports/6230_all_arm-glibc-hardened.patch?rev=1.1&content-type=text/plain |
12 |
|
13 |
Index: 6230_all_arm-glibc-hardened.patch |
14 |
=================================================================== |
15 |
patch by David Lamparter to fix build errors for hardened/arm systems. |
16 |
the logic in setjmp/__longjmp incorrectly tie to "PIC" to figure out |
17 |
whether the code is going into a shared library when it should be using |
18 |
"SHARED". otherwise, building static PIC code goes wrong. |
19 |
|
20 |
https://bugs.gentoo.org/336914 |
21 |
|
22 |
--- ports/sysdeps/arm/eabi/setjmp.S |
23 |
+++ ports/sysdeps/arm/eabi/setjmp.S |
24 |
@@ -37,7 +37,7 @@ |
25 |
add a3, a3, a4 |
26 |
ldr a3, [a3, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET] |
27 |
#else |
28 |
-#ifdef PIC |
29 |
+#ifdef SHARED |
30 |
ldr a3, 1f |
31 |
ldr a4, Lrtld_global_ro |
32 |
0: add a3, pc, a3 |
33 |
@@ -84,7 +84,7 @@ |
34 |
Lrtld_local_ro: |
35 |
.long C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF) |
36 |
#else |
37 |
-#ifdef PIC |
38 |
+#ifdef SHARED |
39 |
1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8 |
40 |
Lrtld_global_ro: |
41 |
.long C_SYMBOL_NAME(_rtld_global_ro)(GOT) |
42 |
--- ports/sysdeps/arm/eabi/__longjmp.S |
43 |
+++ ports/sysdeps/arm/eabi/__longjmp.S |
44 |
@@ -43,7 +43,7 @@ |
45 |
add a2, a2, a3 |
46 |
ldr a2, [a2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET] |
47 |
#else |
48 |
-#ifdef PIC |
49 |
+#ifdef SHARED |
50 |
ldr a2, 1f |
51 |
ldr a3, Lrtld_global_ro |
52 |
0: add a2, pc, a2 |
53 |
@@ -87,7 +87,7 @@ |
54 |
Lrtld_local_ro: |
55 |
.long C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF) |
56 |
#else |
57 |
-#ifdef PIC |
58 |
+#ifdef SHARED |
59 |
1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8 |
60 |
Lrtld_global_ro: |
61 |
.long C_SYMBOL_NAME(_rtld_global_ro)(GOT) |