[PATCH] D55902: [ELF] SymbolTable::addShared: don't set IsNeeded unless IsUsedInRegularObj

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 19 14:39:01 PST 2018


MaskRay added inline comments.


================
Comment at: ELF/SymbolTable.cpp:504
                                 Alignment, VerdefIndex);
     if (!WasInserted) {
       S->Binding = Binding;
----------------
ruiu wrote:
> This part of the logic seems a bit unnecessarily complicated (though I believe I wrote this.) Let's simplify this first.
> 
> seems a bit unnecessarily complicated

It is. It took me some time to understand if `!Config->GcSections` is correct here and later I think it is. I'll also do some experiments to see if the logic can be simplified.


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55902/new/

https://reviews.llvm.org/D55902





More information about the llvm-commits mailing list