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
F96943771: D41120.id124948.diff
Fri, Sep 27, 6:26 AM
F96879317: D41120.id124933.diff
Fri, Sep 27, 1:25 AM
Unknown Object (File)
Wed, Sep 11, 2:59 PM
Unknown Object (File)
Wed, Sep 11, 2:58 PM
Unknown Object (File)
Sun, Sep 8, 11:40 PM
Unknown Object (File)
Sun, Sep 8, 2:10 PM
Unknown Object (File)
Sat, Sep 7, 7:01 PM
Unknown Object (File)
Aug 19 2024, 5:40 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