1 Upstream-Status: Backport [debian]
3 Index: openssl-0.9.8o/crypto/Makefile
4 ===================================================================
5 --- openssl-0.9.8o.orig/crypto/Makefile 2008-09-17 17:10:55.000000000 +0000
6 +++ openssl-0.9.8o/crypto/Makefile 2010-06-06 13:09:28.000000000 +0000
8 echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
9 echo '#endif' ) >buildinf.h
11 -x86cpuid-elf.s: x86cpuid.pl perlasm/x86asm.pl
12 +x86cpuid-elf.S: x86cpuid.pl perlasm/x86asm.pl
13 $(PERL) x86cpuid.pl elf $(CFLAGS) $(PROCESSOR) > $@
14 x86cpuid-cof.s: x86cpuid.pl perlasm/x86asm.pl
15 $(PERL) x86cpuid.pl coff $(CFLAGS) $(PROCESSOR) > $@
17 uplink-cof.s: ../ms/uplink.pl
18 $(PERL) ../ms/uplink.pl coff > $@
20 -x86_64cpuid.s: x86_64cpuid.pl
21 +x86_64cpuid.S: x86_64cpuid.pl
22 $(PERL) x86_64cpuid.pl $@
23 ia64cpuid.s: ia64cpuid.S
24 $(CC) $(CFLAGS) -E ia64cpuid.S > $@
25 Index: openssl-0.9.8o/crypto/x86_64cpuid.pl
26 ===================================================================
27 --- openssl-0.9.8o.orig/crypto/x86_64cpuid.pl 2007-11-11 16:25:00.000000000 +0000
28 +++ openssl-0.9.8o/crypto/x86_64cpuid.pl 2010-06-06 13:09:28.000000000 +0000
30 .size OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu
34 + call OPENSSL_cpuid_setup\@PLT
36 call OPENSSL_cpuid_setup
41 Index: openssl-0.9.8o/crypto/md5/Makefile
42 ===================================================================
43 --- openssl-0.9.8o.orig/crypto/md5/Makefile 2008-09-17 17:11:02.000000000 +0000
44 +++ openssl-0.9.8o/crypto/md5/Makefile 2010-06-06 13:09:28.000000000 +0000
46 mx86-out.s: asm/md5-586.pl ../perlasm/x86asm.pl
47 (cd asm; $(PERL) md5-586.pl a.out $(CFLAGS) > ../$@)
49 -md5-x86_64.s: asm/md5-x86_64.pl; $(PERL) asm/md5-x86_64.pl $@
50 +md5-x86_64.s: asm/md5-x86_64.pl
51 + $(PERL) asm/md5-x86_64.pl $@
54 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
55 Index: openssl-0.9.8o/crypto/des/asm/desboth.pl
56 ===================================================================
57 --- openssl-0.9.8o.orig/crypto/des/asm/desboth.pl 2001-10-24 21:20:56.000000000 +0000
58 +++ openssl-0.9.8o/crypto/des/asm/desboth.pl 2010-06-06 13:09:28.000000000 +0000
63 + &call (&label("pic_point0"));
64 + &set_label("pic_point0");
66 + &add ("ebp", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
69 &comment("Load the data words");
70 &mov($L,&DWP(0,"ebx","",0));
72 &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
73 &mov(&swtmp(1), "eax");
74 &mov(&swtmp(0), "ebx");
75 - &call("DES_encrypt2");
76 + &exch("ebx", "ebp");
77 + &call("DES_encrypt2\@PLT");
78 + &exch("ebx", "ebp");
79 &mov(&swtmp(2), (DWC(($enc)?"0":"1")));
80 &mov(&swtmp(1), "edi");
81 &mov(&swtmp(0), "ebx");
82 - &call("DES_encrypt2");
83 + &exch("ebx", "ebp");
84 + &call("DES_encrypt2\@PLT");
85 + &exch("ebx", "ebp");
86 &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
87 &mov(&swtmp(1), "esi");
88 &mov(&swtmp(0), "ebx");
89 - &call("DES_encrypt2");
90 + &exch("ebx", "ebp");
91 + &call("DES_encrypt2\@PLT");
92 + &exch("ebx", "ebp");
95 &mov($L,&DWP(0,"ebx","",0));
96 Index: openssl-0.9.8o/crypto/rc4/Makefile
97 ===================================================================
98 --- openssl-0.9.8o.orig/crypto/rc4/Makefile 2008-11-19 16:03:50.000000000 +0000
99 +++ openssl-0.9.8o/crypto/rc4/Makefile 2010-06-06 13:09:28.000000000 +0000
101 rx86-out.s: asm/rc4-586.pl ../perlasm/x86asm.pl
102 (cd asm; $(PERL) rc4-586.pl a.out $(CFLAGS) > ../$@)
104 -rc4-x86_64.s: asm/rc4-x86_64.pl; $(PERL) asm/rc4-x86_64.pl $@
105 +rc4-x86_64.S: asm/rc4-x86_64.pl; $(PERL) asm/rc4-x86_64.pl $@
107 rc4-ia64.s: asm/rc4-ia64.S
108 @case `awk '/^#define RC4_INT/{print$$NF}' $(TOP)/include/openssl/opensslconf.h` in \
109 Index: openssl-0.9.8o/crypto/rc4/asm/rc4-x86_64.pl
110 ===================================================================
111 --- openssl-0.9.8o.orig/crypto/rc4/asm/rc4-x86_64.pl 2008-09-16 10:47:27.000000000 +0000
112 +++ openssl-0.9.8o/crypto/rc4/asm/rc4-x86_64.pl 2010-06-06 13:09:28.000000000 +0000
118 + mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),$idx#d
120 mov OPENSSL_ia32cap_P(%rip),$idx#d
128 lea .Lopts-.(%rax),%rax
130 + mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),%edx
132 mov OPENSSL_ia32cap_P(%rip),%edx
137 Index: openssl-0.9.8o/crypto/perlasm/x86unix.pl
138 ===================================================================
139 --- openssl-0.9.8o.orig/crypto/perlasm/x86unix.pl 2008-05-01 23:11:32.000000000 +0000
140 +++ openssl-0.9.8o/crypto/perlasm/x86unix.pl 2010-06-06 13:09:28.000000000 +0000
145 +sub main'function_begin_B_static
147 + local($func,$extra)=@_;
149 + &main'external_label($func);
150 + $func=$under.$func;
152 + local($tmp)=<<"EOF";
157 + { push(@out,"TYPE($func,\@function)\n"); }
159 + { $tmp=push(@out,".def\t$func;\t.scl\t2;\t.type\t32;\t.endef\n"); }
160 + elsif ($main'aout and !$main'pic)
162 + else { push(@out,".type $func,\@function\n"); }
163 + push(@out,".align\t$align\n");
164 + push(@out,"$func:\n");
168 sub main'function_end
180 + addl \$_GLOBAL_OFFSET_TABLE_+[.-.pic_point0],%ebx
189 Index: openssl-0.9.8o/crypto/perlasm/cbc.pl
190 ===================================================================
191 --- openssl-0.9.8o.orig/crypto/perlasm/cbc.pl 2005-05-09 21:48:00.000000000 +0000
192 +++ openssl-0.9.8o/crypto/perlasm/cbc.pl 2010-06-06 13:09:28.000000000 +0000
194 &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
195 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
198 + &call (&label("pic_point0"));
199 + &set_label("pic_point0");
201 + &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
202 + &call("$enc_func\@PLT");
204 &mov("eax", &DWP($data_off,"esp","",0));
205 &mov("ebx", &DWP($data_off+4,"esp","",0));
207 &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
208 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
211 + &call (&label("pic_point1"));
212 + &set_label("pic_point1");
214 + &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point1") . "]");
215 + &call("$enc_func\@PLT");
217 &mov("eax", &DWP($data_off,"esp","",0));
218 &mov("ebx", &DWP($data_off+4,"esp","",0));
220 &mov(&DWP($data_off,"esp","",0), "eax"); # put back
221 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
224 + &call (&label("pic_point2"));
225 + &set_label("pic_point2");
227 + &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point2") . "]");
228 + &call("$dec_func\@PLT");
230 &mov("eax", &DWP($data_off,"esp","",0)); # get return
231 &mov("ebx", &DWP($data_off+4,"esp","",0)); #
233 &mov(&DWP($data_off,"esp","",0), "eax"); # put back
234 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
237 + &call (&label("pic_point3"));
238 + &set_label("pic_point3");
240 + &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point3") . "]");
241 + &call("$dec_func\@PLT");
243 &mov("eax", &DWP($data_off,"esp","",0)); # get return
244 &mov("ebx", &DWP($data_off+4,"esp","",0)); #
245 Index: openssl-0.9.8o/crypto/perlasm/x86_64-xlate.pl
246 ===================================================================
247 --- openssl-0.9.8o.orig/crypto/perlasm/x86_64-xlate.pl 2010-06-06 13:09:00.000000000 +0000
248 +++ openssl-0.9.8o/crypto/perlasm/x86_64-xlate.pl 2010-06-06 13:09:28.000000000 +0000
253 - $line =~ s|[#!].*$||; # get rid of asm-style comments...
254 +# $line =~ s|[#!].*$||; # get rid of asm-style comments...
255 $line =~ s|/\*.*\*/||; # ... and C-style comments...
256 $line =~ s|^\s+||; # ... and skip white spaces in beginning
258 Index: openssl-0.9.8o/crypto/aes/asm/aes-586.pl
259 ===================================================================
260 --- openssl-0.9.8o.orig/crypto/aes/asm/aes-586.pl 2008-12-17 14:14:51.000000000 +0000
261 +++ openssl-0.9.8o/crypto/aes/asm/aes-586.pl 2010-06-06 13:09:28.000000000 +0000
263 sub _data_word() { my $i; while(defined($i=shift)) { &data_word($i,$i); } }
265 &public_label("AES_Te");
266 -&function_begin_B("_x86_AES_encrypt");
267 +&function_begin_B_static("_x86_AES_encrypt");
268 if ($vertical_spin) {
269 # I need high parts of volatile registers to be accessible...
270 &exch ($s1="edi",$key="ebx");
274 &public_label("AES_Td");
275 -&function_begin_B("_x86_AES_decrypt");
276 +&function_begin_B_static("_x86_AES_decrypt");
277 # note that caller is expected to allocate stack frame for me!
278 &mov (&DWP(12,"esp"),$key); # save key
280 @@ -1461,15 +1461,22 @@
281 &public_label("AES_Td");
282 &public_label("AES_Te");
283 &function_begin_B("AES_set_decrypt_key");
285 &mov ("eax",&wparam(0));
286 &mov ("ecx",&wparam(1));
287 &mov ("edx",&wparam(2));
290 + &call (&label("pic_point0"));
291 + &set_label("pic_point0");
293 + &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
294 &mov (&DWP(0,"esp"),"eax");
295 &mov (&DWP(4,"esp"),"ecx");
296 &mov (&DWP(8,"esp"),"edx");
297 - &call ("AES_set_encrypt_key");
298 + &call ("AES_set_encrypt_key\@PLT");
302 &je (&label("proceed"));