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

Dmitry Mikulin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 5 08:38:22 PDT 2017


dmikulin marked 11 inline comments as done.
dmikulin added inline comments.


================
Comment at: lld/ELF/SymbolTable.cpp:190
+template <class ELFT> void SymbolTable<ELFT>::applySymbolRenames() {
+  for (auto &RSI : Config->RenamedSymbols) {
+    Symbol *Sym = RSI.first;
----------------
ruiu wrote:
> What is RSI? I found just `KV` (short for key-value) makes sense in most cases.
RSI is supposed to be Renamed Symbol Iterator, but KV is ok with me too


================
Comment at: lld/test/ELF/lto/wrap-1.ll:13
+
+; Make sure that the 'r' (linker redefined) bit is set for bar and __wrap_bar
+; in the resolutions file.
----------------
pcc wrote:
> Please update this comment. I think you also want to test `'r'` for __real_bar.
Resolutions file is driven by input file symbol tables. Since __real_bar is not defined in an object, it does not show up there. I added a definition and a test for the 'r' flag.


https://reviews.llvm.org/D33621





More information about the llvm-commits mailing list