qbe

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

commit 0437e97a1bb126cfa1974dad7b5479fa4b407f46
parent 3da3815a674c922c520e013b30eb96c7491a5e85
Author: Érico Nogueira <erico.erc@gmail.com>
Date:   Sun, 11 Jul 2021 16:12:19 -0300

gas: always emit GNU-stack note

In cases where stash was 0, gasemitfin exits immediately and the
GNU-stack note isn't added to the asm output. This would result in an
executable where GNU_STACK uses flags RWE instead of the desired RW.

Diffstat:
Mgas.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gas.c b/gas.c @@ -98,6 +98,8 @@ gasemitfin(FILE *f) int sz, i; double d; + fprintf(f, ".section .note.GNU-stack,\"\",@progbits\n"); + if (!stash) return; fprintf(f, "/* floating point constants */\n.data\n"); @@ -126,5 +128,4 @@ gasemitfin(FILE *f) stash = b->link; free(b); } - fprintf(f, ".section .note.GNU-stack,\"\",@progbits\n"); }