Page MenuHomeFreeBSD

share/mk: Pass -znoexecstack to ld.bfd when linking libraries and programs.
ClosedPublic

Authored by jhb on Jul 20 2023, 7:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 3, 1:42 AM
Unknown Object (File)
Thu, Oct 30, 4:53 PM
Unknown Object (File)
Sun, Oct 26, 1:07 AM
Unknown Object (File)
Thu, Oct 23, 10:51 PM
Unknown Object (File)
Thu, Oct 16, 6:03 AM
Unknown Object (File)
Thu, Oct 16, 5:18 AM
Unknown Object (File)
Thu, Oct 16, 5:01 AM
Unknown Object (File)
Sun, Oct 12, 7:13 PM

Details

Summary

lld assumes -znoexecstack by default whereas ld.bfd still defaults to
-zexecstack in the absence of .note.GNU-stack annotations. Adding the
flags centrally avoids having to patch various libraries in the tree
as one-offs (e.g. OpenSSL 3 is the current thing generating new
warnings with ld.bfd).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable