[PATCH] D84131: [ELF] Support -r --gc-sections
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 21 09:27:43 PDT 2020
MaskRay added inline comments.
================
Comment at: lld/ELF/InputFiles.cpp:951-955
+ // We want to add a dependency to target, similar like we do for
+ // -emit-relocs below. This is useful for the case when linker script
+ // contains the "/DISCARD/". It is perhaps uncommon to use a script with
+ // -r, but we faced it in the Linux kernel and have to handle such case
+ // and not to crash.
----------------
jhenderson wrote:
> similar like we -> like we
> for the case when linker script -> when a linker script
> the "/DISCARD/" -> a "/DISCARD/" output section
> have to handle such case and not to crash -> have to handle such cases without crashing
The two `if` can be merged. I merged them.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84131/new/
https://reviews.llvm.org/D84131
More information about the llvm-commits
mailing list