qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit 201881d6ca47150fb4037c9babbcf6717471da60
parent 2feb742b6911b385fc80177f8df77315fef9cd37
Author: Michael Forney <mforney@mforney.org>
Date:   Wed, 21 Oct 2020 15:32:14 -0700

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.

Diffstat:
Mgas.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/gas.c b/gas.c @@ -122,4 +122,5 @@ gasemitfin(FILE *f) stash = b->link; free(b); } + fprintf(f, ".section .note.GNU-stack,\"\",@progbits\n"); }