Project

General

Profile

Actions

Feature #14308

closed

discard SHF_EXCLUDE sections when linking kernel modules

Added by Rich Lowe 8 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
tools - gate/build tools
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

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.

Actions #1

Updated by Electric Monk 8 months ago

  • Gerrit CR set to 1871
Actions #2

Updated by Rich Lowe 8 months ago

testing:
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.

Actions #3

Updated by Electric Monk 8 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit c9d20e659e1e8b7bc9bd0d5c3ff5fe49be65bc6a

commit  c9d20e659e1e8b7bc9bd0d5c3ff5fe49be65bc6a
Author: Richard Lowe <richlowe@richlowe.net>
Date:   2021-12-21T21:12:18.000Z

    14308 discard SHF_EXCLUDE sections when linking kernel modules
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Reviewed by: Jason King <jason.brian.king@gmail.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF