[PATCH] D92301: [LLD][ELF] - Don't keep empty output sections that are explicitly assigned to segment.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 1 11:55:54 PST 2020
MaskRay added inline comments.
================
Comment at: lld/ELF/LinkerScript.cpp:1073
+ // In the code below we are removing empty sections from the output.
+ // There are cases where we want to propagate program headers when they are
----------------
MaskRay wrote:
> Suggest:
>
> ```
> // The code below may remove empty output sections. We should save the specified program headers (if exist) and propagate them to subsequent sections which do not specify program headers.
> // An example of such linker script is:
> // SECTIONS { .empty : { *(.empty) } :rw
> // .foo : { *(.foo) } }
> // Note: at this point the order of output sections has not been finalized, because orphans have not been inserted into their expected positions. We will handle them in adjustSectionsAfterSorting().
> ```
such linker script -> such a linker script
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92301/new/
https://reviews.llvm.org/D92301
More information about the llvm-commits
mailing list