Feature #10581
ld(1) should know kernel modules are a thing
100%
Description
To facilitate features in the link editor that are unsuitable for relocatable objects in general, but acceptable for kernel modules (the first being linker-sets, future examples possibly including -zcombreloc, for eg), the link-editor should know that kernel modules are a distinct kind of object.
Do this by implementing an Oracle-style -ztype that takes =kmod, which clues in the link-editor, and sets a dynamic tag usable by other software
Make ld(1) refuse to accept a kmod as link-editor input (we currently, unfortunately, do that with genunix), teach file(1) to spot the flag for kernel modules.
Updated by Rich Lowe almost 2 years ago
testing: build with -ztype=kmod patched into uts/ and the new linker, elfdump -d, file, etc.
Updated by Electric Monk almost 2 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
git commit b6a0e2cd4ce8d91fe9dc750c44e662d7c7e5fb8e
commit b6a0e2cd4ce8d91fe9dc750c44e662d7c7e5fb8e Author: Richard Lowe <richlowe@richlowe.net> Date: 2019-04-24T16:59:38.000Z 10366 ld(1) should support GNU-style linker sets 10581 ld(1) should know kernel modules are a thing Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Dan McDonald <danmcd@joyent.com>