mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-06-29 01:03:38 +08:00
asm: add missing .note.GNU-stack markers
Add .note.GNU-stack section declarations to hand-written assembly sources so ELF builds do not produce executables or libraries with an executable stack. These assembly implementations do not require an executable stack. Adding the marker restores normal non-executable stack/NX hardening. Signed-off-by: hrimfaxi <outmatch@gmail.com>
This commit is contained in:
@@ -99,4 +99,6 @@ func(gf128_mul):
|
||||
|
||||
ret
|
||||
|
||||
|
||||
#ifdef __ELF__
|
||||
.section .note.GNU-stack,"",@progbits
|
||||
#endif
|
||||
|
||||
@@ -2139,3 +2139,6 @@ func(sm2_z256_point_add_affine):
|
||||
popq %rbp
|
||||
.byte 0xf3,0xc3
|
||||
|
||||
#if defined(__linux__) && defined(__ELF__)
|
||||
.section .note.GNU-stack,"",@progbits
|
||||
#endif
|
||||
|
||||
@@ -2210,3 +2210,6 @@ func(sm2_z256_modn_mont_sqr):
|
||||
ldp x29,x30,[sp],#64
|
||||
ret
|
||||
|
||||
#ifdef __ELF__
|
||||
.section .note.GNU-stack,"",@progbits
|
||||
#endif
|
||||
|
||||
@@ -895,3 +895,6 @@ func(sm9_z256_modp_mont_sqr):
|
||||
ldp x29,x30,[sp],#64
|
||||
ret
|
||||
|
||||
#ifdef __ELF__
|
||||
.section .note.GNU-stack,"",@progbits
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user