Skip to content

Commit

Permalink
Non-executable stack continued
Browse files Browse the repository at this point in the history
The ".note.GNU-stack" section makes sense only in Linux and BSD, and is rejected by the MacOS assembler.

MacOS has nonexecutable stacks by default since version 10.5 and need no special declarations.
  • Loading branch information
xavierleroy committed Sep 23, 2017
1 parent 96a8242 commit 93b8911
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- On Linux and BSD, keep the stack non-executable.

Release 1.5 (2017-05-26):
- Install all .cmx files, improving performance of clients and
avoiding a warning from OCaml 4.03 and up.
Expand Down
3 changes: 2 additions & 1 deletion caml_z_i686.S
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@


/* makes the stack non-executable. */
#ifdef Z_ELF
.section .note.GNU-stack,"",@progbits

#endif

/* helper functions */
/* **************** */
Expand Down
3 changes: 2 additions & 1 deletion caml_z_x86_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@


/* makes the stack non-executable. */
#ifdef Z_ELF
.section .note.GNU-stack,"",@progbits

#endif

/* helper functions */
/* **************** */
Expand Down

0 comments on commit 93b8911

Please sign in to comment.