https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117434

--- Comment #10 from kargls at comcast dot net ---
(In reply to Iain Sandoe from comment #9)
> (In reply to kargls from comment #8)
> > (In reply to Iain Sandoe from comment #7)
> > 
> 
> > /usr/local/bin/ld: warning: /tmp/ccVWAwWh.o: requires executable stack
> > (because the .note.GNU-stack section is executable)
> 
> FAOD - does this actually prevent the executable from running - or is it
> that your platform is (correctly) pointing out that executable stack can be
> considered a security risk?
> 
> Perhaps your static linker has some option that would prevent that warning,
> is the man-page visible online?

The compiled executable still runs of my FreeBSD system.  I have

% which ld
/usr/local/bin/ld
% ld --version
GNU ld (GNU Binutils) 2.40

Looking at ld.info, I see a '-z execstack' option.

% gfcx -o z -z execstack y.f90
% ./z

No warning appears.  I also find

% gfcx -o z -z noexecstack -save-temps y.f90
% ./z

produces no warning and the compiled executable still run.

I suppose the question then comes down to where does the

        .section        .note.GNU-stack,"x",@progbits

come from in the z-y.s save-temps file.

Reply via email to