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
F131994504: D41120.id.diff
Sun, Oct 12, 7:13 PM
F131994496: D41120.id124948.diff
Sun, Oct 12, 7:13 PM
F131994490: D41120.id124933.diff
Sun, Oct 12, 7:12 PM
F131932538: D41120.diff
Sun, Oct 12, 7:41 AM
Unknown Object (File)
Sun, Oct 12, 1:11 AM
Unknown Object (File)
Fri, Oct 10, 2:39 AM
Unknown Object (File)
Fri, Sep 26, 10:23 PM
Unknown Object (File)
Mon, Sep 22, 8:52 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