diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-08-13 02:25:32 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-08-15 10:06:21 +0900 |
| commit | a5ab4f4dfacd1938a64df4d07df346774f62c541 (patch) | |
| tree | 2eca028cfb7afbca9bb3668e89685d6768174e92 /codegen.c | |
| parent | d38303ba5860cdfb3f2532a3cc1e787a8cccbafd (diff) | |
| download | ducc-a5ab4f4dfacd1938a64df4d07df346774f62c541.tar.gz ducc-a5ab4f4dfacd1938a64df4d07df346774f62c541.tar.zst ducc-a5ab4f4dfacd1938a64df4d07df346774f62c541.zip | |
feat: output .note.GNU-stack section and remove "-z noexecstack" from ld flags
Diffstat (limited to 'codegen.c')
| -rw-r--r-- | codegen.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -531,6 +531,10 @@ void codegen(Program* prog) { printf(".intel_syntax noprefix\n\n"); + // For GNU ld: + // https://sourceware.org/binutils/docs/ld/Options.html + printf(".section .note.GNU-stack,\"\",@progbits\n\n"); + printf(".section .rodata\n\n"); for (int i = 0; prog->str_literals[i]; ++i) { printf(".Lstr__%d:\n", i + 1); |
