[PATCH] D46029: [llvm-objcopy] Implement --redefine-sym option

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 26 02:19:24 PDT 2018


jhenderson added inline comments.


================
Comment at: tools/llvm-objcopy/Object.cpp:208
+    Callable(*Sym);
+}
 
----------------
jakehehrlich wrote:
> Can you add in the stable_partition + assignIndices code used in localize here. It's unfortunately more expensive but it means that forEachSymbol can be used with impunity and without thought.
If we want to do the extra work of localizing a symbol here (and I think we do), we should probably rename the function to `updateSymbols` or similar as `forEachSymbol` implies to me that there are no additional effects beyond the `Callable` call.

Alternatively, what's stopping us doing the stable partitioning etc in `SymbolTable->finalize()`?


Repository:
  rL LLVM

https://reviews.llvm.org/D46029





More information about the llvm-commits mailing list