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