[PATCH] D28950: [LLD][ELF] Correct sh_info for static symbol table
    Rui Ueyama via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Sat Jan 21 16:22:53 PST 2017
    
    
  
ruiu added inline comments.
================
Comment at: ELF/SyntheticSections.cpp:1076
   if (!StrTabSec.isDynamic()) {
     std::stable_sort(
         Symbols.begin(), Symbols.end(),
----------------
Maybe we should stop using NumLocals at all here? I wonder if something like this works.
  auto It = std::stable_partition(Symbols.begin(), Symbols.end(), [&](SymbolTableEntry &S) { returns true if S is STB_LOCAL; });
  this->Info = It - Symbols.begin();
  this->OutSec->Info = It - Symbols.begin();
https://reviews.llvm.org/D28950
    
    
More information about the llvm-commits
mailing list