Page MenuHomeFreeBSD

Apply the module ldscript correctly on a shared ko
Needs ReviewPublic

Authored by andrew on Jan 17 2022, 5:14 PM.

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 OK
Unit
No Unit 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.