[PATCH] D33621: Fix for -wrap linker option and LTO, PR 33145

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 2 17:20:07 PDT 2017


davide added inline comments.


================
Comment at: lld/ELF/SymbolTable.cpp:167
+  // Tell LTO not to eliminate this symbol
+  Wrap->IsUsedInRegularObj = true;
 
----------------
You're setting `IsUsedInRegularObj` from what I can see, here, for all the symbols passed with `--wrap`.
Can you check this is really NFC? IIRC it could impact the way symbols are added (or not) to the symbol table.


================
Comment at: lld/ELF/SymbolTable.cpp:184
+  // Tell LTO not to eliminate this symbol
+  Sym->IsUsedInRegularObj = true;
+  Config->RenamedSymbols[AliasSym] = RenamedSymbol{Sym, AliasSym->Binding};
----------------
Same here.


https://reviews.llvm.org/D33621





More information about the llvm-commits mailing list