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)
Tue, Dec 17, 9:28 AM
Unknown Object (File)
Dec 4 2024, 2:41 AM
Unknown Object (File)
Nov 15 2024, 4:29 PM
Unknown Object (File)
Nov 15 2024, 2:17 PM
Unknown Object (File)
Oct 21 2024, 8:46 PM
Unknown Object (File)
Oct 1 2024, 4:59 PM
Unknown Object (File)
Sep 27 2024, 6:26 AM
Unknown Object (File)
Sep 27 2024, 1:25 AM

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