Mac OS X >= 10.7 support
[silc.git] / lib / silccrypt / aes_x86_64.asm
index d6ac1eb32b5d197a1c550cf25b1ffa003dee0a68..404e911635faa7425d00aa64758bd0426cc0323f 100644 (file)
 %ifdef ENCRYPTION\r
 \r
     global  aes_encrypt\r
+    global  _aes_encrypt\r
 %ifdef DLL_EXPORT\r
     export  aes_encrypt\r
 %endif\r
@@ -688,6 +689,7 @@ enc_tab:
     section .text align=16\r
     align   16\r
 aes_encrypt:\r
+_aes_encrypt:\r
 \r
 %ifndef WIN32\r
     sub     rsp, 4*8        ; gnu/linux binary interface\r
@@ -705,7 +707,7 @@ aes_encrypt:
     mov     [rsp+3*8], r12  ; context in r8\r
 \r
     movzx   esi, byte [kptr+4*KS_LENGTH]\r
-    lea     tptr,[enc_tab wrt rip]\r
+    lea     tptr,[rel enc_tab]\r
     sub     kptr, fofs\r
 \r
     mov     eax, [rdi+0*4]\r
@@ -767,6 +769,7 @@ aes_encrypt:
 %ifdef DECRYPTION\r
 \r
     global  aes_decrypt\r
+    global  _aes_decrypt\r
 %ifdef DLL_EXPORT\r
     export  aes_decrypt\r
 %endif\r
@@ -782,6 +785,7 @@ dec_tab:
     section .text align=16\r
     align   16\r
 aes_decrypt:\r
+_aes_decrypt:\r
 \r
 %ifndef WIN32\r
     sub     rsp, 4*8        ; gnu/linux binary interface\r
@@ -799,7 +803,7 @@ aes_decrypt:
     mov     [rsp+3*8], r12  ; context in r8\r
 \r
     movzx   esi,byte[kptr+4*KS_LENGTH]\r
-    lea     tptr,[dec_tab wrt rip]\r
+    lea     tptr,[rel dec_tab]\r
     sub     kptr, rofs\r
 \r
     mov     eax, [rdi+0*4]\r