[PATCH] D77807: [LLD][ELF] Implement -discard-* for cases when -r or -emit-relocs are used.
Igor Kudrin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 10 01:03:29 PDT 2020
ikudrin added a comment.
In D77807#1973831 <https://reviews.llvm.org/D77807#1973831>, @MaskRay wrote:
> > This makes the behavior of LLD compatible with GNU linkers.
>
> I have verified the patch seems to match the behavior, but can you describe a bit why you need such a behavior?
Our customers noticed the difference when tried to switch from `ld.bfd` to `lld`. They use `--discard-all -r` and want only useful symbols to survive.
> For `-shared --discard-all --emit-relocs`, this patch appears to be a bug fix. Previously we discard all local symbols.
Thanks. I forgot about that because that was not my direct intention. Maybe it is worth mentioning in the patch's description.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77807/new/
https://reviews.llvm.org/D77807
More information about the llvm-commits
mailing list