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.
This commit is contained in:
parent
2feb742b69
commit
201881d6ca
1 changed files with 1 additions and 0 deletions
1
gas.c
1
gas.c
|
@ -122,4 +122,5 @@ gasemitfin(FILE *f)
|
|||
stash = b->link;
|
||||
free(b);
|
||||
}
|
||||
fprintf(f, ".section .note.GNU-stack,\"\",@progbits\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue