0 | |
Index: openssl-1.0.0c/crypto/Makefile
|
1 | |
===================================================================
|
2 | |
--- openssl-1.0.0c.orig/crypto/Makefile 2010-07-27 00:09:59.000000000 +0200
|
3 | |
+++ openssl-1.0.0c/crypto/Makefile 2010-12-12 18:05:36.000000000 +0100
|
4 | |
@@ -58,7 +58,7 @@
|
|
0 |
Index: openssl-1.0.1/crypto/Makefile
|
|
1 |
===================================================================
|
|
2 |
--- openssl-1.0.1.orig/crypto/Makefile 2011-12-10 01:37:55.000000000 +0000
|
|
3 |
+++ openssl-1.0.1/crypto/Makefile 2012-03-17 09:29:15.000000000 +0000
|
|
4 |
@@ -60,7 +60,7 @@
|
5 | 5 |
echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
|
6 | 6 |
echo '#endif' ) >buildinf.h
|
7 | 7 |
|
|
10 | 10 |
$(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
|
11 | 11 |
|
12 | 12 |
applink.o: $(TOP)/ms/applink.c
|
13 | |
@@ -70,7 +70,7 @@
|
14 | |
uplink-cof.s: $(TOP)/ms/uplink.pl
|
15 | |
$(PERL) $(TOP)/ms/uplink.pl coff > $@
|
16 | |
|
17 | |
-x86_64cpuid.s: x86_64cpuid.pl
|
18 | |
+x86_64cpuid.S: x86_64cpuid.pl
|
19 | |
$(PERL) x86_64cpuid.pl $(PERLASM_SCHEME) > $@
|
20 | |
ia64cpuid.s: ia64cpuid.S
|
21 | |
$(CC) $(CFLAGS) -E ia64cpuid.S > $@
|
22 | |
Index: openssl-1.0.0c/crypto/x86_64cpuid.pl
|
23 | |
===================================================================
|
24 | |
--- openssl-1.0.0c.orig/crypto/x86_64cpuid.pl 2010-04-14 21:25:09.000000000 +0200
|
25 | |
+++ openssl-1.0.0c/crypto/x86_64cpuid.pl 2010-12-12 18:05:36.000000000 +0100
|
26 | |
@@ -14,7 +14,11 @@
|
27 | |
print<<___;
|
|
13 |
@@ -72,7 +72,7 @@
|
|
14 |
uplink-x86.s: $(TOP)/ms/uplink-x86.pl
|
|
15 |
$(PERL) $(TOP)/ms/uplink-x86.pl $(PERLASM_SCHEME) > $@
|
|
16 |
|
|
17 |
-x86_64cpuid.s: x86_64cpuid.pl; $(PERL) x86_64cpuid.pl $(PERLASM_SCHEME) > $@
|
|
18 |
+x86_64cpuid.S: x86_64cpuid.pl; $(PERL) x86_64cpuid.pl $(PERLASM_SCHEME) > $@
|
|
19 |
ia64cpuid.s: ia64cpuid.S; $(CC) $(CFLAGS) -E ia64cpuid.S > $@
|
|
20 |
ppccpuid.s: ppccpuid.pl; $(PERL) ppccpuid.pl $(PERLASM_SCHEME) $@
|
|
21 |
pariscid.s: pariscid.pl; $(PERL) pariscid.pl $(PERLASM_SCHEME) $@
|
|
22 |
Index: openssl-1.0.1/crypto/x86_64cpuid.pl
|
|
23 |
===================================================================
|
|
24 |
--- openssl-1.0.1.orig/crypto/x86_64cpuid.pl 2011-11-14 21:01:16.000000000 +0000
|
|
25 |
+++ openssl-1.0.1/crypto/x86_64cpuid.pl 2012-03-17 09:20:04.000000000 +0000
|
|
26 |
@@ -20,7 +20,11 @@
|
28 | 27 |
.extern OPENSSL_cpuid_setup
|
|
28 |
.hidden OPENSSL_cpuid_setup
|
29 | 29 |
.section .init
|
30 | 30 |
+#ifdef OPENSSL_PIC
|
31 | 31 |
+ call OPENSSL_cpuid_setup\@PLT
|
|
33 | 33 |
call OPENSSL_cpuid_setup
|
34 | 34 |
+#endif
|
35 | 35 |
|
36 | |
.text
|
37 | |
|
38 | |
Index: openssl-1.0.0c/crypto/des/asm/desboth.pl
|
39 | |
===================================================================
|
40 | |
--- openssl-1.0.0c.orig/crypto/des/asm/desboth.pl 2001-10-24 23:20:56.000000000 +0200
|
41 | |
+++ openssl-1.0.0c/crypto/des/asm/desboth.pl 2010-12-12 18:05:36.000000000 +0100
|
|
36 |
.hidden OPENSSL_ia32cap_P
|
|
37 |
.comm OPENSSL_ia32cap_P,8,4
|
|
38 |
Index: openssl-1.0.1/crypto/des/asm/desboth.pl
|
|
39 |
===================================================================
|
|
40 |
--- openssl-1.0.1.orig/crypto/des/asm/desboth.pl 2001-10-24 21:20:56.000000000 +0000
|
|
41 |
+++ openssl-1.0.1/crypto/des/asm/desboth.pl 2012-03-17 09:20:04.000000000 +0000
|
42 | 42 |
@@ -16,6 +16,11 @@
|
43 | 43 |
|
44 | 44 |
&push("edi");
|
|
76 | 76 |
|
77 | 77 |
&stack_pop(3);
|
78 | 78 |
&mov($L,&DWP(0,"ebx","",0));
|
79 | |
Index: openssl-1.0.0c/crypto/rc4/Makefile
|
80 | |
===================================================================
|
81 | |
--- openssl-1.0.0c.orig/crypto/rc4/Makefile 2009-02-11 11:01:36.000000000 +0100
|
82 | |
+++ openssl-1.0.0c/crypto/rc4/Makefile 2010-12-12 18:05:36.000000000 +0100
|
|
79 |
Index: openssl-1.0.1/crypto/rc4/Makefile
|
|
80 |
===================================================================
|
|
81 |
--- openssl-1.0.1.orig/crypto/rc4/Makefile 2011-11-14 20:42:21.000000000 +0000
|
|
82 |
+++ openssl-1.0.1/crypto/rc4/Makefile 2012-03-17 09:20:04.000000000 +0000
|
83 | 83 |
@@ -44,7 +44,7 @@
|
84 | 84 |
rc4-586.s: asm/rc4-586.pl ../perlasm/x86asm.pl
|
85 | 85 |
$(PERL) asm/rc4-586.pl $(PERLASM_SCHEME) $(CFLAGS) > $@
|
|
87 | 87 |
-rc4-x86_64.s: asm/rc4-x86_64.pl
|
88 | 88 |
+rc4-x86_64.S: asm/rc4-x86_64.pl
|
89 | 89 |
$(PERL) asm/rc4-x86_64.pl $(PERLASM_SCHEME) > $@
|
90 | |
|
91 | |
rc4-ia64.S: asm/rc4-ia64.pl
|
92 | |
Index: openssl-1.0.0c/crypto/rc4/asm/rc4-x86_64.pl
|
93 | |
===================================================================
|
94 | |
--- openssl-1.0.0c.orig/crypto/rc4/asm/rc4-x86_64.pl 2009-04-27 21:31:04.000000000 +0200
|
95 | |
+++ openssl-1.0.0c/crypto/rc4/asm/rc4-x86_64.pl 2010-12-12 18:05:36.000000000 +0100
|
96 | |
@@ -279,7 +279,11 @@
|
|
90 |
rc4-md5-x86_64.s: asm/rc4-md5-x86_64.pl
|
|
91 |
$(PERL) asm/rc4-md5-x86_64.pl $(PERLASM_SCHEME) > $@
|
|
92 |
Index: openssl-1.0.1/crypto/rc4/asm/rc4-x86_64.pl
|
|
93 |
===================================================================
|
|
94 |
--- openssl-1.0.1.orig/crypto/rc4/asm/rc4-x86_64.pl 2011-07-01 14:13:52.000000000 +0000
|
|
95 |
+++ openssl-1.0.1/crypto/rc4/asm/rc4-x86_64.pl 2012-03-17 09:28:11.000000000 +0000
|
|
96 |
@@ -157,7 +157,11 @@
|
|
97 |
mov -4($dat),$YY#b
|
|
98 |
cmpl \$-1,256($dat)
|
|
99 |
je .LRC4_CHAR
|
|
100 |
+#ifdef OPENSSL_PIC
|
|
101 |
+ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),%r8d
|
|
102 |
+#else
|
|
103 |
mov OPENSSL_ia32cap_P(%rip),%r8d
|
|
104 |
+#endif
|
|
105 |
xor $TX[1],$TX[1]
|
|
106 |
inc $XX[0]#b
|
|
107 |
sub $XX[0],$TX[1]
|
|
108 |
@@ -442,7 +446,11 @@
|
97 | 109 |
xor %r10,%r10
|
98 | 110 |
xor %r11,%r11
|
99 | 111 |
|
100 | 112 |
+#ifdef OPENSSL_PIC
|
101 | |
+ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),$idx#d
|
|
113 |
+ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),$idx#d
|
102 | 114 |
+#else
|
103 | 115 |
mov OPENSSL_ia32cap_P(%rip),$idx#d
|
104 | 116 |
+#endif
|
105 | |
bt \$20,$idx#d
|
106 | |
jnc .Lw1stloop
|
107 | |
bt \$30,$idx#d
|
108 | |
@@ -346,7 +350,11 @@
|
|
117 |
bt \$20,$idx#d # RC4_CHAR?
|
|
118 |
jc .Lc1stloop
|
|
119 |
jmp .Lw1stloop
|
|
120 |
@@ -506,7 +514,11 @@
|
109 | 121 |
.align 16
|
110 | 122 |
RC4_options:
|
111 | 123 |
lea .Lopts(%rip),%rax
|
|
115 | 127 |
mov OPENSSL_ia32cap_P(%rip),%edx
|
116 | 128 |
+#endif
|
117 | 129 |
bt \$20,%edx
|
118 | |
jnc .Ldone
|
119 | |
add \$12,%rax
|
120 | |
Index: openssl-1.0.0c/crypto/perlasm/cbc.pl
|
121 | |
===================================================================
|
122 | |
--- openssl-1.0.0c.orig/crypto/perlasm/cbc.pl 2005-05-09 23:48:00.000000000 +0200
|
123 | |
+++ openssl-1.0.0c/crypto/perlasm/cbc.pl 2010-12-12 18:05:36.000000000 +0100
|
|
130 |
jc .L8xchar
|
|
131 |
bt \$30,%edx
|
|
132 |
Index: openssl-1.0.1/crypto/perlasm/cbc.pl
|
|
133 |
===================================================================
|
|
134 |
--- openssl-1.0.1.orig/crypto/perlasm/cbc.pl 2011-07-13 06:22:46.000000000 +0000
|
|
135 |
+++ openssl-1.0.1/crypto/perlasm/cbc.pl 2012-03-17 09:20:04.000000000 +0000
|
124 | 136 |
@@ -122,7 +122,11 @@
|
125 | 137 |
&mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
|
126 | 138 |
&mov(&DWP($data_off+4,"esp","",0), "ebx"); #
|
|
134 | 146 |
|
135 | 147 |
&mov("eax", &DWP($data_off,"esp","",0));
|
136 | 148 |
&mov("ebx", &DWP($data_off+4,"esp","",0));
|
137 | |
@@ -187,7 +191,11 @@
|
|
149 |
@@ -185,7 +189,11 @@
|
138 | 150 |
&mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
|
139 | 151 |
&mov(&DWP($data_off+4,"esp","",0), "ebx"); #
|
140 | 152 |
|
|
147 | 159 |
|
148 | 160 |
&mov("eax", &DWP($data_off,"esp","",0));
|
149 | 161 |
&mov("ebx", &DWP($data_off+4,"esp","",0));
|
150 | |
@@ -220,7 +228,11 @@
|
|
162 |
@@ -218,7 +226,11 @@
|
151 | 163 |
&mov(&DWP($data_off,"esp","",0), "eax"); # put back
|
152 | 164 |
&mov(&DWP($data_off+4,"esp","",0), "ebx"); #
|
153 | 165 |
|
|
160 | 172 |
|
161 | 173 |
&mov("eax", &DWP($data_off,"esp","",0)); # get return
|
162 | 174 |
&mov("ebx", &DWP($data_off+4,"esp","",0)); #
|
163 | |
@@ -263,7 +275,11 @@
|
|
175 |
@@ -261,7 +273,11 @@
|
164 | 176 |
&mov(&DWP($data_off,"esp","",0), "eax"); # put back
|
165 | 177 |
&mov(&DWP($data_off+4,"esp","",0), "ebx"); #
|
166 | 178 |
|
|
173 | 185 |
|
174 | 186 |
&mov("eax", &DWP($data_off,"esp","",0)); # get return
|
175 | 187 |
&mov("ebx", &DWP($data_off+4,"esp","",0)); #
|
176 | |
Index: openssl-1.0.0c/crypto/perlasm/x86_64-xlate.pl
|
177 | |
===================================================================
|
178 | |
--- openssl-1.0.0c.orig/crypto/perlasm/x86_64-xlate.pl 2010-12-12 18:05:36.000000000 +0100
|
179 | |
+++ openssl-1.0.0c/crypto/perlasm/x86_64-xlate.pl 2010-12-12 18:05:36.000000000 +0100
|
180 | |
@@ -638,7 +638,7 @@
|
|
188 |
Index: openssl-1.0.1/crypto/perlasm/x86_64-xlate.pl
|
|
189 |
===================================================================
|
|
190 |
--- openssl-1.0.1.orig/crypto/perlasm/x86_64-xlate.pl 2012-03-17 09:19:38.000000000 +0000
|
|
191 |
+++ openssl-1.0.1/crypto/perlasm/x86_64-xlate.pl 2012-03-17 09:20:04.000000000 +0000
|
|
192 |
@@ -786,7 +786,7 @@
|
181 | 193 |
|
182 | 194 |
chomp($line);
|
183 | 195 |
|
|
186 | 198 |
$line =~ s|/\*.*\*/||; # ... and C-style comments...
|
187 | 199 |
$line =~ s|^\s+||; # ... and skip white spaces in beginning
|
188 | 200 |
|
189 | |
Index: openssl-1.0.0c/crypto/perlasm/x86gas.pl
|
190 | |
===================================================================
|
191 | |
--- openssl-1.0.0c.orig/crypto/perlasm/x86gas.pl 2008-12-17 20:56:47.000000000 +0100
|
192 | |
+++ openssl-1.0.0c/crypto/perlasm/x86gas.pl 2010-12-12 18:05:36.000000000 +0100
|
193 | |
@@ -209,7 +209,17 @@
|
194 | |
if ($::elf)
|
|
201 |
Index: openssl-1.0.1/crypto/perlasm/x86gas.pl
|
|
202 |
===================================================================
|
|
203 |
--- openssl-1.0.1.orig/crypto/perlasm/x86gas.pl 2011-12-09 19:16:35.000000000 +0000
|
|
204 |
+++ openssl-1.0.1/crypto/perlasm/x86gas.pl 2012-03-17 09:30:54.000000000 +0000
|
|
205 |
@@ -218,6 +218,15 @@
|
|
206 |
elsif ($::elf)
|
195 | 207 |
{ $initseg.=<<___;
|
196 | 208 |
.section .init
|
197 | 209 |
+#ifdef OPENSSL_PIC
|
198 | 210 |
+ pushl %ebx
|
199 | |
+ call .pic_point0
|
|
211 |
+ call .pic_point0
|
200 | 212 |
+.pic_point0:
|
201 | |
+ popl %ebx
|
202 | |
+ addl \$_GLOBAL_OFFSET_TABLE_+[.-.pic_point0],%ebx
|
|
213 |
+ popl %ebx
|
|
214 |
+ addl \$_GLOBAL_OFFSET_TABLE_+[.-.pic_point0],%ebx
|
203 | 215 |
+ call $f\@PLT
|
204 | 216 |
+ popl %ebx
|
205 | 217 |
+#else
|
206 | 218 |
call $f
|
207 | |
+#endif
|
208 | |
jmp .Linitalign
|
209 | |
.align $align
|
210 | |
.Linitalign:
|
211 | |
Index: openssl-1.0.0c/crypto/aes/asm/aes-x86_64.pl
|
212 | |
===================================================================
|
213 | |
--- openssl-1.0.0c.orig/crypto/aes/asm/aes-x86_64.pl 2008-12-27 14:32:21.000000000 +0100
|
214 | |
+++ openssl-1.0.0c/crypto/aes/asm/aes-x86_64.pl 2010-12-12 18:05:36.000000000 +0100
|
215 | |
@@ -1669,7 +1669,11 @@
|
|
219 |
___
|
|
220 |
}
|
|
221 |
Index: openssl-1.0.1/crypto/aes/asm/aes-x86_64.pl
|
|
222 |
===================================================================
|
|
223 |
--- openssl-1.0.1.orig/crypto/aes/asm/aes-x86_64.pl 2011-11-14 21:01:17.000000000 +0000
|
|
224 |
+++ openssl-1.0.1/crypto/aes/asm/aes-x86_64.pl 2012-03-17 09:20:04.000000000 +0000
|
|
225 |
@@ -1678,7 +1678,11 @@
|
216 | 226 |
lea .LAES_Td(%rip),$sbox
|
217 | 227 |
.Lcbc_picked_te:
|
218 | 228 |
|
|
224 | 234 |
cmp \$$speed_limit,%rdx
|
225 | 235 |
jb .Lcbc_slow_prologue
|
226 | 236 |
test \$15,%rdx
|
227 | |
Index: openssl-1.0.0c/crypto/aes/Makefile
|
228 | |
===================================================================
|
229 | |
--- openssl-1.0.0c.orig/crypto/aes/Makefile 2010-12-12 18:15:06.000000000 +0100
|
230 | |
+++ openssl-1.0.0c/crypto/aes/Makefile 2010-12-12 18:15:30.000000000 +0100
|
231 | |
@@ -51,7 +51,7 @@
|
232 | |
aes-586.s: asm/aes-586.pl ../perlasm/x86asm.pl
|
233 | |
$(PERL) asm/aes-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
|
|
237 |
Index: openssl-1.0.1/crypto/aes/Makefile
|
|
238 |
===================================================================
|
|
239 |
--- openssl-1.0.1.orig/crypto/aes/Makefile 2011-11-14 20:42:21.000000000 +0000
|
|
240 |
+++ openssl-1.0.1/crypto/aes/Makefile 2012-03-17 09:20:04.000000000 +0000
|
|
241 |
@@ -55,7 +55,7 @@
|
|
242 |
aesni-x86.s: asm/aesni-x86.pl ../perlasm/x86asm.pl
|
|
243 |
$(PERL) asm/aesni-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
|
234 | 244 |
|
235 | 245 |
-aes-x86_64.s: asm/aes-x86_64.pl
|
236 | 246 |
+aes-x86_64.S: asm/aes-x86_64.pl
|
237 | 247 |
$(PERL) asm/aes-x86_64.pl $(PERLASM_SCHEME) > $@
|
238 | |
|
239 | |
aes-sparcv9.s: asm/aes-sparcv9.pl
|
|
248 |
vpaes-x86_64.s: asm/vpaes-x86_64.pl
|
|
249 |
$(PERL) asm/vpaes-x86_64.pl $(PERLASM_SCHEME) > $@
|