This is an interesting case, however, I don't think it's worth spending time trying to prevent it. I'll refer to the comments in #151
Thank you! :)
@ErikSchierboom I haven't gotten my write permissions yet, could we get this one merged? And also close #101 as duplicate?
Yes you can merge it, thank you!
@ErikSchierboom They were removed because I wasn't active as a maintainer. We discussed it a while back in another PR, and I decided to wait. But maybe it would be better if I got permissions again, so I don't have to ping you in every PR.
Perfect, thank you!
Noticed in another PR that this fails for macOS. I think we need to ifidn it for elf64 only:
%ifidn __OUTPUT_FORMAT__,elf64
section .note.GNU-stack noalloc noexec nowrite progbits
%endif
Try the following instead:
%ifidn __OUTPUT_FORMAT__,elf64
section .note.GNU-stack noalloc noexec nowrite progbits
%endif
Wait, there seems to be an error on macOS:
triangle.asm:95: error: segment name `.note.GNU-stack' not recognized
Perfect, thank you!
Wait, could you update the assembly files with the changes in https://github.com/exercism/x86-64-assembly/pull/161 before merging?
Thank you for the PR, looks good!
@ErikSchierboom Could you help with merging this?
Thanks for the PR, looks good!
@ErikSchierboom Feel free to approve and merge it!
Cool, thanks! If you'd like to make a PR, I'd be happy to review it. Otherwise I'll try to fix this when I find some time.
Hi, thanks for opening an issue on this, interesting..
Searching for note gnu stack, I found the following: https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart
The interesting part is the section "How to fix the stack (in practice)".
TL;DR we should add the following at the end of all assembly files:
section .note.GNU-stack noalloc noexec nowrite progbits
Could you verify that this solves the problem?