[PATCH] D46064: [llvm-objcopy] Add --localize-symbol option

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 25 11:09:45 PDT 2018


jakehehrlich added a comment.

Looks mostly good to me, just need to merge the passes over the symbols.



================
Comment at: tools/llvm-objcopy/llvm-objcopy.cpp:194-207
   if (Config.LocalizeHidden) {
     Obj.SymbolTable->localize([](const Symbol &Sym) {
       return Sym.Visibility == STV_HIDDEN || Sym.Visibility == STV_INTERNAL;
     });
   }
 
+  if (!Config.LocalizeSymbol.empty()) {
----------------
Accumulate the functions so that localize can happen in a single pass. See what I did above with sections. Also in https://reviews.llvm.org/D46029 I requested that localize be replaced with a slightly more generalized 'map over symbols'. You can go ahead and write this in terms of localize but depending on which patch goes though first one or the other of you will need to change some code.  Just a heads up.


Repository:
  rL LLVM

https://reviews.llvm.org/D46064





More information about the llvm-commits mailing list