GCC 103863, We need a warning for loss of no-exec stacks

Hans-Peter Nilsson hp@bitrange.com
Fri Dec 31 18:27:20 GMT 2021


On Wed, 29 Dec 2021, Jeffrey Walton via Binutils wrote:

> Would anyone like to comment on this GCC feature request:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103863 .
>
> The reason I'm bringing it here is, AP suggested a warning should be
> in the linker (which combines object files), and not the compiler
> (which creates object files).

When you implement that warning, be advised that targets have
different defaults; some require a marking to enable executable
stack, some to disable it.  Grep for DEFAULT_STACK_PERMS in
glibc and observe presence of PF_X for different targets.

This is complicated by gcc target-specific
NEED_INDICATE_EXEC_STACK macro possibly being out of sync.

It was some time before I did more than (as now) grep for these
things so there may be additional factors, like a global
override.

brgds, H-P


More information about the Binutils mailing list