summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-connectivity/openssl/openssl-1.0.0e/debian/pic.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-connectivity/openssl/openssl-1.0.0e/debian/pic.patch')
-rw-r--r--meta-oe/recipes-connectivity/openssl/openssl-1.0.0e/debian/pic.patch240
1 files changed, 0 insertions, 240 deletions
diff --git a/meta-oe/recipes-connectivity/openssl/openssl-1.0.0e/debian/pic.patch b/meta-oe/recipes-connectivity/openssl/openssl-1.0.0e/debian/pic.patch
deleted file mode 100644
index 2c6dc44fe..000000000
--- a/meta-oe/recipes-connectivity/openssl/openssl-1.0.0e/debian/pic.patch
+++ /dev/null
@@ -1,240 +0,0 @@
1Index: openssl-1.0.0c/crypto/Makefile
2===================================================================
3--- openssl-1.0.0c.orig/crypto/Makefile 2010-07-27 00:09:59.000000000 +0200
4+++ openssl-1.0.0c/crypto/Makefile 2010-12-12 18:05:36.000000000 +0100
5@@ -58,7 +58,7 @@
6 echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
7 echo '#endif' ) >buildinf.h
8
9-x86cpuid.s: x86cpuid.pl perlasm/x86asm.pl
10+x86cpuid.S: x86cpuid.pl perlasm/x86asm.pl
11 $(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
12
13 applink.o: $(TOP)/ms/applink.c
14@@ -70,7 +70,7 @@
15 uplink-cof.s: $(TOP)/ms/uplink.pl
16 $(PERL) $(TOP)/ms/uplink.pl coff > $@
17
18-x86_64cpuid.s: x86_64cpuid.pl
19+x86_64cpuid.S: x86_64cpuid.pl
20 $(PERL) x86_64cpuid.pl $(PERLASM_SCHEME) > $@
21 ia64cpuid.s: ia64cpuid.S
22 $(CC) $(CFLAGS) -E ia64cpuid.S > $@
23Index: openssl-1.0.0c/crypto/x86_64cpuid.pl
24===================================================================
25--- openssl-1.0.0c.orig/crypto/x86_64cpuid.pl 2010-04-14 21:25:09.000000000 +0200
26+++ openssl-1.0.0c/crypto/x86_64cpuid.pl 2010-12-12 18:05:36.000000000 +0100
27@@ -14,7 +14,11 @@
28 print<<___;
29 .extern OPENSSL_cpuid_setup
30 .section .init
31+#ifdef OPENSSL_PIC
32+ call OPENSSL_cpuid_setup\@PLT
33+#else
34 call OPENSSL_cpuid_setup
35+#endif
36
37 .text
38
39Index: openssl-1.0.0c/crypto/des/asm/desboth.pl
40===================================================================
41--- openssl-1.0.0c.orig/crypto/des/asm/desboth.pl 2001-10-24 23:20:56.000000000 +0200
42+++ openssl-1.0.0c/crypto/des/asm/desboth.pl 2010-12-12 18:05:36.000000000 +0100
43@@ -16,6 +16,11 @@
44
45 &push("edi");
46
47+ &call (&label("pic_point0"));
48+ &set_label("pic_point0");
49+ &blindpop("ebp");
50+ &add ("ebp", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
51+
52 &comment("");
53 &comment("Load the data words");
54 &mov($L,&DWP(0,"ebx","",0));
55@@ -47,15 +52,21 @@
56 &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
57 &mov(&swtmp(1), "eax");
58 &mov(&swtmp(0), "ebx");
59- &call("DES_encrypt2");
60+ &exch("ebx", "ebp");
61+ &call("DES_encrypt2\@PLT");
62+ &exch("ebx", "ebp");
63 &mov(&swtmp(2), (DWC(($enc)?"0":"1")));
64 &mov(&swtmp(1), "edi");
65 &mov(&swtmp(0), "ebx");
66- &call("DES_encrypt2");
67+ &exch("ebx", "ebp");
68+ &call("DES_encrypt2\@PLT");
69+ &exch("ebx", "ebp");
70 &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
71 &mov(&swtmp(1), "esi");
72 &mov(&swtmp(0), "ebx");
73- &call("DES_encrypt2");
74+ &exch("ebx", "ebp");
75+ &call("DES_encrypt2\@PLT");
76+ &exch("ebx", "ebp");
77
78 &stack_pop(3);
79 &mov($L,&DWP(0,"ebx","",0));
80Index: openssl-1.0.0c/crypto/rc4/Makefile
81===================================================================
82--- openssl-1.0.0c.orig/crypto/rc4/Makefile 2009-02-11 11:01:36.000000000 +0100
83+++ openssl-1.0.0c/crypto/rc4/Makefile 2010-12-12 18:05:36.000000000 +0100
84@@ -44,7 +44,7 @@
85 rc4-586.s: asm/rc4-586.pl ../perlasm/x86asm.pl
86 $(PERL) asm/rc4-586.pl $(PERLASM_SCHEME) $(CFLAGS) > $@
87
88-rc4-x86_64.s: asm/rc4-x86_64.pl
89+rc4-x86_64.S: asm/rc4-x86_64.pl
90 $(PERL) asm/rc4-x86_64.pl $(PERLASM_SCHEME) > $@
91
92 rc4-ia64.S: asm/rc4-ia64.pl
93Index: openssl-1.0.0c/crypto/rc4/asm/rc4-x86_64.pl
94===================================================================
95--- openssl-1.0.0c.orig/crypto/rc4/asm/rc4-x86_64.pl 2009-04-27 21:31:04.000000000 +0200
96+++ openssl-1.0.0c/crypto/rc4/asm/rc4-x86_64.pl 2010-12-12 18:05:36.000000000 +0100
97@@ -279,7 +279,11 @@
98 xor %r10,%r10
99 xor %r11,%r11
100
101+#ifdef OPENSSL_PIC
102+ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),$idx#d
103+#else
104 mov OPENSSL_ia32cap_P(%rip),$idx#d
105+#endif
106 bt \$20,$idx#d
107 jnc .Lw1stloop
108 bt \$30,$idx#d
109@@ -346,7 +350,11 @@
110 .align 16
111 RC4_options:
112 lea .Lopts(%rip),%rax
113+#ifdef OPENSSL_PIC
114+ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),%edx
115+#else
116 mov OPENSSL_ia32cap_P(%rip),%edx
117+#endif
118 bt \$20,%edx
119 jnc .Ldone
120 add \$12,%rax
121Index: openssl-1.0.0c/crypto/perlasm/cbc.pl
122===================================================================
123--- openssl-1.0.0c.orig/crypto/perlasm/cbc.pl 2005-05-09 23:48:00.000000000 +0200
124+++ openssl-1.0.0c/crypto/perlasm/cbc.pl 2010-12-12 18:05:36.000000000 +0100
125@@ -122,7 +122,11 @@
126 &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
127 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
128
129- &call($enc_func);
130+ &call (&label("pic_point0"));
131+ &set_label("pic_point0");
132+ &blindpop("ebx");
133+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
134+ &call("$enc_func\@PLT");
135
136 &mov("eax", &DWP($data_off,"esp","",0));
137 &mov("ebx", &DWP($data_off+4,"esp","",0));
138@@ -187,7 +191,11 @@
139 &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
140 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
141
142- &call($enc_func);
143+ &call (&label("pic_point1"));
144+ &set_label("pic_point1");
145+ &blindpop("ebx");
146+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point1") . "]");
147+ &call("$enc_func\@PLT");
148
149 &mov("eax", &DWP($data_off,"esp","",0));
150 &mov("ebx", &DWP($data_off+4,"esp","",0));
151@@ -220,7 +228,11 @@
152 &mov(&DWP($data_off,"esp","",0), "eax"); # put back
153 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
154
155- &call($dec_func);
156+ &call (&label("pic_point2"));
157+ &set_label("pic_point2");
158+ &blindpop("ebx");
159+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point2") . "]");
160+ &call("$dec_func\@PLT");
161
162 &mov("eax", &DWP($data_off,"esp","",0)); # get return
163 &mov("ebx", &DWP($data_off+4,"esp","",0)); #
164@@ -263,7 +275,11 @@
165 &mov(&DWP($data_off,"esp","",0), "eax"); # put back
166 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
167
168- &call($dec_func);
169+ &call (&label("pic_point3"));
170+ &set_label("pic_point3");
171+ &blindpop("ebx");
172+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point3") . "]");
173+ &call("$dec_func\@PLT");
174
175 &mov("eax", &DWP($data_off,"esp","",0)); # get return
176 &mov("ebx", &DWP($data_off+4,"esp","",0)); #
177Index: openssl-1.0.0c/crypto/perlasm/x86_64-xlate.pl
178===================================================================
179--- openssl-1.0.0c.orig/crypto/perlasm/x86_64-xlate.pl 2010-12-12 18:05:36.000000000 +0100
180+++ openssl-1.0.0c/crypto/perlasm/x86_64-xlate.pl 2010-12-12 18:05:36.000000000 +0100
181@@ -638,7 +638,7 @@
182
183 chomp($line);
184
185- $line =~ s|[#!].*$||; # get rid of asm-style comments...
186+# $line =~ s|[#!].*$||; # get rid of asm-style comments...
187 $line =~ s|/\*.*\*/||; # ... and C-style comments...
188 $line =~ s|^\s+||; # ... and skip white spaces in beginning
189
190Index: openssl-1.0.0c/crypto/perlasm/x86gas.pl
191===================================================================
192--- openssl-1.0.0c.orig/crypto/perlasm/x86gas.pl 2008-12-17 20:56:47.000000000 +0100
193+++ openssl-1.0.0c/crypto/perlasm/x86gas.pl 2010-12-12 18:05:36.000000000 +0100
194@@ -209,7 +209,17 @@
195 if ($::elf)
196 { $initseg.=<<___;
197 .section .init
198+#ifdef OPENSSL_PIC
199+ pushl %ebx
200+ call .pic_point0
201+.pic_point0:
202+ popl %ebx
203+ addl \$_GLOBAL_OFFSET_TABLE_+[.-.pic_point0],%ebx
204+ call $f\@PLT
205+ popl %ebx
206+#else
207 call $f
208+#endif
209 jmp .Linitalign
210 .align $align
211 .Linitalign:
212Index: openssl-1.0.0c/crypto/aes/asm/aes-x86_64.pl
213===================================================================
214--- openssl-1.0.0c.orig/crypto/aes/asm/aes-x86_64.pl 2008-12-27 14:32:21.000000000 +0100
215+++ openssl-1.0.0c/crypto/aes/asm/aes-x86_64.pl 2010-12-12 18:05:36.000000000 +0100
216@@ -1669,7 +1669,11 @@
217 lea .LAES_Td(%rip),$sbox
218 .Lcbc_picked_te:
219
220+#ifdef OPENSSL_PIC
221+ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),%r10d
222+#else
223 mov OPENSSL_ia32cap_P(%rip),%r10d
224+#endif
225 cmp \$$speed_limit,%rdx
226 jb .Lcbc_slow_prologue
227 test \$15,%rdx
228Index: openssl-1.0.0c/crypto/aes/Makefile
229===================================================================
230--- openssl-1.0.0c.orig/crypto/aes/Makefile 2010-12-12 18:15:06.000000000 +0100
231+++ openssl-1.0.0c/crypto/aes/Makefile 2010-12-12 18:15:30.000000000 +0100
232@@ -51,7 +51,7 @@
233 aes-586.s: asm/aes-586.pl ../perlasm/x86asm.pl
234 $(PERL) asm/aes-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
235
236-aes-x86_64.s: asm/aes-x86_64.pl
237+aes-x86_64.S: asm/aes-x86_64.pl
238 $(PERL) asm/aes-x86_64.pl $(PERLASM_SCHEME) > $@
239
240 aes-sparcv9.s: asm/aes-sparcv9.pl