3 ms·
I just checked and it's mentioned in the elf and ld manpages. It should probably be called out more, but there is at least some documentation for it. from man
by tbirdz 10y ago
I just checked and it's mentioned in the elf and ld manpages. It should probably be called out more, but there is at least some documentation for it.
from man elf:
.note.GNU-stack
This section is used in Linux object files for declaring stack attributes. This section is of type SHT_PROGBITS. The only attribute used is SHF_EXECINSTR. This indicates to the GNU linker that the object file requires an executable stack.
- kazinator 10y agoThe text you quoted doesn't inform anyone that if you don't have that section at all, an executable stack is also required. I can't find any such explanation in the elf man page. Nobody is going to read "man elf" or "man ld", if they already know how to write assembly code and link it to their C, and whatever they know appears to be working fine.
- djcapelis 10y agoPeople who know how to write assembly code and link it into their C programs are probably one of the most likely folks to read man elf and man ld, but I definitely agree the documentation should be better. Submit a patch?