projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add non-executing stack when compiling AES asm for GNU/ELF.
[silc.git]
/
lib
/
silccrypt
/
aes_x86.asm
diff --git
a/lib/silccrypt/aes_x86.asm
b/lib/silccrypt/aes_x86.asm
index f9c34e6623065ac52b66c44790202ca3f4ca2004..2742c1cd68e7357a8c7f3358ce82708653339e7c 100644
(file)
--- a/
lib/silccrypt/aes_x86.asm
+++ b/
lib/silccrypt/aes_x86.asm
@@
-219,10
+219,6
@@
stk_spc equ 20 ; stack space
%define eltab_2(x) [t_fl+2048+4*x]
%define eltab_3(x) [t_fl+3072+4*x]
%define eltab_2(x) [t_fl+2048+4*x]
%define eltab_3(x) [t_fl+3072+4*x]
-%else
-
-%define etab_b(x) byte [t_fn+3072+4*x]
-
%endif
; ROUND FUNCTION. Build column[2] on ESI and column[3] on EDI that have the
%endif
; ROUND FUNCTION. Build column[2] on ESI and column[3] on EDI that have the
@@
-302,25
+298,6
@@
stk_spc equ 20 ; stack space
mov %1,eltab_%3(%4)
%endmacro
mov %1,eltab_%3(%4)
%endmacro
-%else
-
- %macro lr_xor 4
- movzx %4,%2
- movzx %4,etab_b(%4)
- %if %3 != 0
- shl %4,8*%3
- %endif
- xor %1,%4
- %endmacro
-
- %macro lr_mov 4
- movzx %4,%2
- movzx %1,etab_b(%4)
- %if %3 != 0
- shl %1,8*%3
- %endif
- %endmacro
-
%endif
%macro enc_round 0
%endif
%macro enc_round 0
@@
-442,12
+419,6
@@
stk_spc equ 20 ; stack space
%define dltab_2(x) [t_il+2048+4*x]
%define dltab_3(x) [t_il+3072+4*x]
%define dltab_2(x) [t_il+2048+4*x]
%define dltab_3(x) [t_il+3072+4*x]
-%else
-
- extern t_ibox
-
-%define dtab_x(x) byte [t_ibox+x]
-
%endif
%macro irn_fun 2
%endif
%macro irn_fun 2
@@
-504,25
+475,6
@@
stk_spc equ 20 ; stack space
mov %1,dltab_%3(%4)
%endmacro
mov %1,dltab_%3(%4)
%endmacro
-%else
-
- %macro li_xor 4
- movzx %4,%2
- movzx %4,dtab_x(%4)
- %if %3 != 0
- shl %4,8*%3
- %endif
- xor %1,%4
- %endmacro
-
- %macro li_mov 4
- movzx %4,%2
- movzx %1,dtab_x(%4)
- %if %3 != 0
- shl %1,8*%3
- %endif
- %endmacro
-
%endif
%macro dec_round 0
%endif
%macro dec_round 0
@@
-643,3
+595,7
@@
stk_spc equ 20 ; stack space
%endif
end
%endif
end
+
+%ifidn __OUTPUT_FORMAT__,elf
+section .note.GNU-stack noalloc noexec nowrite progbits
+%endif