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)
Wed, Jun 4, 10:16 PM
Unknown Object (File)
Wed, Jun 4, 9:12 PM
Unknown Object (File)
Wed, Jun 4, 7:35 PM
Unknown Object (File)
Sat, May 24, 11:36 AM
Unknown Object (File)
Fri, May 9, 4:24 AM
Unknown Object (File)
May 3 2025, 2:27 AM
Unknown Object (File)
Apr 30 2025, 2:36 AM
Unknown Object (File)
Apr 5 2025, 1:27 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