diff options
| author | Michael Forney <[email protected]> | 2020-10-21 15:32:14 -0700 |
|---|---|---|
| committer | Quentin Carbonneaux <[email protected]> | 2021-03-02 08:36:23 +0100 |
| commit | 201881d6ca47150fb4037c9babbcf6717471da60 (patch) | |
| tree | 2ce4c6c69899da8f1a73db2e1813500c780c5670 | |
| parent | 2feb742b6911b385fc80177f8df77315fef9cd37 (diff) | |
gas: emit GNU-stack note so that stack is not executable
GNU ld uses the presence of these notes to determine the flags of
the final GNU_STACK program header. If they are present in every
object, then the resulting executable's GNU_STACK uses flags RW
instead of RWE.
Reported by Érico Nogueira Rolim.
| -rw-r--r-- | gas.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -122,4 +122,5 @@ gasemitfin(FILE *f) stash = b->link; free(b); } + fprintf(f, ".section .note.GNU-stack,\"\",@progbits\n"); } |
