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, Oct 21, 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
Unknown Object (File)
Sep 11 2024, 2:59 PM
Unknown Object (File)
Sep 11 2024, 2:58 PM
Unknown Object (File)
Sep 8 2024, 11:40 PM
Unknown Object (File)
Sep 8 2024, 2:10 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 52758
Build 49649: arc lint + arc unit