diff options
author | otto <> | 2008-09-19 06:09:01 +0000 |
---|---|---|
committer | otto <> | 2008-09-19 06:09:01 +0000 |
commit | d8a728372d924a59e821c02139ecd7915c848b4d (patch) | |
tree | 4bd0fad7309fd9e5917f84ba519345a74823bc67 /src/lib/libcrypto/aes/asm | |
parent | 404f42e023f74f798d3e32269dc691e855f21e4c (diff) | |
download | openbsd-d8a728372d924a59e821c02139ecd7915c848b4d.tar.gz openbsd-d8a728372d924a59e821c02139ecd7915c848b4d.tar.bz2 openbsd-d8a728372d924a59e821c02139ecd7915c848b4d.zip |
fix some cause of bad TEXTREL on i386 and amd64
- global function calls in .init sections (diff makes them via PLT)
- calls to global functions in aes-586.S (made static or local)
- global variable accesses in rc4-x86_64.S (now made via GOT)
from djm@large; ok miod@
Diffstat (limited to 'src/lib/libcrypto/aes/asm')
-rw-r--r-- | src/lib/libcrypto/aes/asm/aes-586.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/aes/asm/aes-586.pl b/src/lib/libcrypto/aes/asm/aes-586.pl index 89fa261794..3da307bef9 100644 --- a/src/lib/libcrypto/aes/asm/aes-586.pl +++ b/src/lib/libcrypto/aes/asm/aes-586.pl | |||
@@ -250,7 +250,7 @@ sub enclast() | |||
250 | sub _data_word() { my $i; while(defined($i=shift)) { &data_word($i,$i); } } | 250 | sub _data_word() { my $i; while(defined($i=shift)) { &data_word($i,$i); } } |
251 | 251 | ||
252 | &public_label("AES_Te"); | 252 | &public_label("AES_Te"); |
253 | &function_begin_B("_x86_AES_encrypt"); | 253 | &function_begin_C("_x86_AES_encrypt"); |
254 | if ($vertical_spin) { | 254 | if ($vertical_spin) { |
255 | # I need high parts of volatile registers to be accessible... | 255 | # I need high parts of volatile registers to be accessible... |
256 | &exch ($s1="edi",$key="ebx"); | 256 | &exch ($s1="edi",$key="ebx"); |
@@ -539,7 +539,7 @@ sub declast() | |||
539 | } | 539 | } |
540 | 540 | ||
541 | &public_label("AES_Td"); | 541 | &public_label("AES_Td"); |
542 | &function_begin_B("_x86_AES_decrypt"); | 542 | &function_begin_C("_x86_AES_decrypt"); |
543 | # note that caller is expected to allocate stack frame for me! | 543 | # note that caller is expected to allocate stack frame for me! |
544 | &mov (&DWP(12,"esp"),$key); # save key | 544 | &mov (&DWP(12,"esp"),$key); # save key |
545 | 545 | ||
@@ -1240,7 +1240,7 @@ sub enckey() | |||
1240 | # int AES_set_encrypt_key(const unsigned char *userKey, const int bits, | 1240 | # int AES_set_encrypt_key(const unsigned char *userKey, const int bits, |
1241 | # AES_KEY *key) | 1241 | # AES_KEY *key) |
1242 | &public_label("AES_Te"); | 1242 | &public_label("AES_Te"); |
1243 | &function_begin("AES_set_encrypt_key"); | 1243 | &function_begin("AES_set_encrypt_key", "", "_x86_AES_set_encrypt_key"); |
1244 | &mov ("esi",&wparam(0)); # user supplied key | 1244 | &mov ("esi",&wparam(0)); # user supplied key |
1245 | &mov ("edi",&wparam(2)); # private key schedule | 1245 | &mov ("edi",&wparam(2)); # private key schedule |
1246 | 1246 | ||
@@ -1467,7 +1467,7 @@ sub deckey() | |||
1467 | &mov (&DWP(0,"esp"),"eax"); | 1467 | &mov (&DWP(0,"esp"),"eax"); |
1468 | &mov (&DWP(4,"esp"),"ecx"); | 1468 | &mov (&DWP(4,"esp"),"ecx"); |
1469 | &mov (&DWP(8,"esp"),"edx"); | 1469 | &mov (&DWP(8,"esp"),"edx"); |
1470 | &call ("AES_set_encrypt_key"); | 1470 | &call ("_x86_AES_set_encrypt_key"); |
1471 | &add ("esp",12); | 1471 | &add ("esp",12); |
1472 | &cmp ("eax",0); | 1472 | &cmp ("eax",0); |
1473 | &je (&label("proceed")); | 1473 | &je (&label("proceed")); |