Page MenuHomeFreeBSD

Apply the module ldscript correctly on a shared ko
Needs ReviewPublic

Authored by andrew on Jan 17 2022, 5:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 13, 4:08 PM
Unknown Object (File)
Tue, Nov 11, 8:19 AM
Unknown Object (File)
Oct 22 2025, 12:31 AM
Unknown Object (File)
Oct 19 2025, 12:49 PM
Unknown Object (File)
Oct 19 2025, 12:49 PM
Unknown Object (File)
Oct 18 2025, 10:17 PM
Unknown Object (File)
Oct 16 2025, 5:35 AM
Unknown Object (File)
Sep 29 2025, 8:36 AM
Subscribers
None

Details

Reviewers
kib
markj
imp
Summary

For kernel modules built as a shared object we link all the object
files together, then run ld again with the final link flags.

Previously we would apply the linker script to the former ld command
however the second linker command may undo these changes as it is
lacking access to the script. Fix this by moving the linker script to
the latter ld command when building a shared kernel object.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43955
Build 40843: arc lint + arc unit

Event Timeline

andrew created this revision.
sys/conf/kmod.mk
244

Why this variable is needed?

sys/conf/ldscript.kmod.i386
31

Could you please explain the reason for this addition? Perhaps this should be done in the comment.