Page MenuHomeFreeBSD

add -znotext to kernel module link invocation
ClosedPublic

Authored by emaste on Jun 18 2017, 12:42 AM.
Tags
None
Referenced Files
F132568555: D11250.id29880.diff
Sat, Oct 18, 1:26 AM
F132568551: D11250.id29763.diff
Sat, Oct 18, 1:25 AM
Unknown Object (File)
Fri, Oct 17, 3:31 PM
Unknown Object (File)
Fri, Oct 17, 6:50 AM
Unknown Object (File)
Sat, Oct 11, 7:29 AM
Unknown Object (File)
Sep 14 2025, 2:21 AM
Unknown Object (File)
Sep 13 2025, 5:31 AM
Unknown Object (File)
Aug 20 2025, 11:47 AM
Subscribers
None

Details

Summary

By default GNU ld and GNU gold allow relocations in the read-only text segment, and lld does not.

For kernel modules I think it's fine, and so we can just enable this universally, but please let me know if we shouldn't.

Description of these options, from ld.gold's help text:

-z text                     Do not permit relocations in read-only segments
-z notext                   Permit relocations in read-only segments (default)

GNU ld 2.17.50 does not document -z text or -z notext but does claim that "Other [-z] keywords are ignored".

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Jun 18 2017, 1:59 PM
This revision was automatically updated to reflect the committed changes.