Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Warning: requires executable stack...

54 views
Skip to first unread message

reinert

unread,
Apr 28, 2023, 1:38:24 AM4/28/23
to
Hello,

I use alire and I just updated via these commands:

alr index --update-all
alr toolchain --select

(selected
gnat_native=12.2.1
and
gprbuild=22.0.1
)

All seem OK, but when I use "alr build" I finally get this warning:

...../.config/alire/cache/dependencies/gnat_native_12.2.1_11f3b811/bin/../lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: warning: kobio0.o: requires executable stack (because the .note.GNU-stack section is executable)
Build finished successfully in 19.48 seconds.

When trying a simple "hello_world" programme, I do not get this annoying warning.

Any hint?
I do not like warnings which I do not understand anything from :-)

reinert


Simon Wright

unread,
Apr 28, 2023, 3:26:20 AM4/28/23
to
reinert <rei...@gmail.com> writes:

> ...../.config/alire/cache/dependencies/gnat_native_12.2.1_11f3b811/bin/../lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../x86_64-pc-linux-gnu/bin/ld:
> warning: kobio0.o: requires executable stack (because the
> .note.GNU-stack section is executable)

Creating executable code on the stack is one way of getting malicious
code past virus checkers. Modern OSs will prevent this approach.

So far as I know, GNAT will only do this to implement "trampolines", but see
here:
https://docs.adacore.com/live/wave/gnat_rm/html/gnat_rm/gnat_rm/standard_and_implementation_defined_restrictions.html#no-implicit-dynamic-code

reinert

unread,
Apr 28, 2023, 6:04:58 AM4/28/23
to
Thanks for swift answer. Seems like I have to live with the warning.

I learned about pragma restrictions(...); :-)

reinert
0 new messages