discard SHF_EXCLUDE sections when linking kernel modules
As with other "final" output from the link-editor, kernel modules should not contain sections with the SHF_EXCLUDE flag set. These should only propagate to pure relocatable objects, which are presumed to be then input to further link-edits.
Test suite additions, illumos build and boot, building a given kernel object with clang (I picked one which happened to work) and made sure the SHF_EXCLUDE sections didn't make it through. Building libld with -Winline and making sure I didn't introduce anything new for andyf to fix. Toomas also built in his clang workspace and found it to be better.
Updated by Electric Monk 8 months ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
commit c9d20e659e1e8b7bc9bd0d5c3ff5fe49be65bc6a Author: Richard Lowe <email@example.com> Date: 2021-12-21T21:12:18.000Z 14308 discard SHF_EXCLUDE sections when linking kernel modules Reviewed by: Andrew Stormont <firstname.lastname@example.org> Reviewed by: Jason King <email@example.com> Reviewed by: Toomas Soome <firstname.lastname@example.org> Approved by: Robert Mustacchi <email@example.com>