/usr/bin/arm-linux-gnu-ld: warning: start.o: missing .note.GNU-stack section implies executable stack /usr/bin/arm-linux-gnu-ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker /usr/bin/arm-linux-gnu-ld: warning: interrupts.elf has a LOAD segment with RWX permissions
What this is all about (apparently) is a tightening of security. Allowing an executable stack (which I never intended nor asked for by the way) allows certain hacks to be done.
Note that this first error referenced "start.o" from "start.S". So the C source files are not causing any problem. This article discusses the whole business:
The article recommends adding a line like this:.section .note.GNU-stack, “x”, @progbitsThis isn't quite right, and it doesn't say where to add such a line. What I did was to compile one of my C source files with the -S switch which outputs a ".s" file. It has the following as the last line of the file:
.section .note.GNU-stack,"",%progbitsWhen I add this as the last line of my "start.S" file, the warning goes away.
To just make the linker shut up, we can use: "--no-warn-rwx-segments." We do this by adding an option like this (when using gcc to link) to the linker line:
-Wl,--no-warn-rwx-segmentsThis works just fine and now I can compile and link without warnings. If I am directly invoking "ld" to link, I use:
ld --no-warn-rwx-segments
Tom's electronics pages / tom@mmto.org