Fix GNU stack management This patch indicates to GCC that an executable stack is not necessary, since these files are only responsible for storing assets as far as I know. If Surge doesn't build with the correct stack settings, it might not run on machines with hardware stack protection. See the link below for more information. https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart Patch by Ryan Fox --- a/scripts/linux/emit-vector-piggy.py +++ b/scripts/linux/emit-vector-piggy.py @@ -73,6 +73,10 @@ header_file.write(u""" {NULL, 0} }; """) +source_file.write("""#if defined(__linux__) && defined(__ELF__) +.section .note.GNU-stack,"",%progbits +#endif""") + def save_if_modified(path, contents): try: --- a/src/linux/ConfigurationXml.S +++ b/src/linux/ConfigurationXml.S @@ -8,3 +8,7 @@ configurationXmlEnd: .type configurationXmlNullTerminator, @object configurationXmlNullTerminator: .int 0 + +#if defined(__linux__) && defined(__ELF__) +.section .note.GNU-stack,"",%progbits +#endif