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

--- Comment #13 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
(In reply to kargls from comment #12)
--- snip ---
> > If you consider that the warning should be treated as significant, then
> > there's an alternate implementation for the trampoline which places the
> > executable fragment on the heap (we can then regulate when that heap page is
> > writeable to be mutually exclusive with when it's executable) - which
> > provides a measure more of security than the blanket enable on the stack. 
> > To use this means implementing a couple of builtin functions in libgcc and
> > then dealing with enabling it.  I don't know exactly what would be required
> > for *BSD .. but it's probably not wildly different from Linux or Darwin -
> > and we've implemented it on both of those.
> 
> Thanks for the explanation.  This looks like something that would
> need to be coordinated with FreeBSD toolchain developers.  The
> default linker on FreeBSD is /usr/bin/ld, which is a symlink to 
> ld.lld.
> 
> % ld.lld --version
> LLD 18.1.6 (FreeBSD llvmorg-18.1.6-0-g1118c2e05e67-1500000) (compatible with
> GNU linkers)
> 
> Its manual page also shows the -z option.  So, for now, users can
> use the option suppress the warning.

It is not just FreeBSD. I opened a new PR 117455.

Reply via email to