Bug 28772 - Provide /PASSTHRU/ section rule similar to /DISCARD/
Summary: Provide /PASSTHRU/ section rule similar to /DISCARD/
Status: UNCONFIRMED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: unspecified
: P2 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-12 20:30 UTC by Kees Cook
Modified: 2023-09-04 12:16 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kees Cook 2022-01-12 20:30:21 UTC
When building the Function-Granular Kernel Address Space Layout Randomization (FGKASLR), there needs to be a way to specify wildcards for input section names that should be passed through with their existing name (not collected into a new section, and not discarded).

Right now, it's only possible to accomplish this be either naming each of these sections in the linker script (and with 64,000 sections, the linker becomes hugely slow, and complicates the kernel build), or by disabling orphan section warnings.

For example:

    /PASSTHRU/ : {
        *(.text.*)
    }

Here is one place where this need was discussed:
https://lore.kernel.org/linux-hardening/202109011815.1C439A6DA9@keescook/
Comment 1 Nick Clifton 2023-09-04 12:16:11 UTC
Here is one reply to the request:

https://sourceware.org/pipermail/binutils/2023-September/129373.html