ld(1) should know kernel modules are a thing
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 Electric Monk about 3 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
commit b6a0e2cd4ce8d91fe9dc750c44e662d7c7e5fb8e Author: Richard Lowe <email@example.com> 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 <firstname.lastname@example.org> Reviewed by: Hans Rosenfeld <email@example.com> Reviewed by: Robert Mustacchi <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>