diff --git a/lib/alloca86-bt.S b/lib/alloca86-bt.S index 76a85a0f..ffad5156 100644 --- a/lib/alloca86-bt.S +++ b/lib/alloca86-bt.S @@ -40,4 +40,8 @@ p6: push %edx ret +/* mark stack as nonexecutable */ +#if defined __ELF__ && defined __linux__ + .section .note.GNU-stack,"",@progbits +#endif /* ---------------------------------------------- */ diff --git a/lib/alloca86.S b/lib/alloca86.S index b06d4c44..b836efbf 100644 --- a/lib/alloca86.S +++ b/lib/alloca86.S @@ -28,4 +28,8 @@ p3: push %edx ret +/* mark stack as nonexecutable */ +#if defined __ELF__ && defined __linux__ + .section .note.GNU-stack,"",@progbits +#endif /* ---------------------------------------------- */ diff --git a/lib/alloca86_64.S b/lib/alloca86_64.S index 44f66c81..dd46ce6f 100644 --- a/lib/alloca86_64.S +++ b/lib/alloca86_64.S @@ -35,4 +35,8 @@ p3: push %rdx ret +/* mark stack as nonexecutable */ +#if defined __ELF__ && defined __linux__ + .section .note.GNU-stack,"",@progbits +#endif /* ---------------------------------------------- */