[PATCH] D46029: [llvm-objcopy] Implement --redefine-sym option
Alexander Shaposhnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 24 16:12:52 PDT 2018
alexshap added inline comments.
================
Comment at: tools/llvm-objcopy/Object.cpp:915
+void Object::renameSymbol(StringRef Old, StringRef New) {
+ for (auto &S : Sections)
----------------
jakehehrlich wrote:
> This method isn't needed, the symbol table of an Object isn't private and (currently) there will only ever be one symbol table (the spec still ensures this). obj->SymbolTable->renameSymbol(Old, New) is sufficient to do this (with a null check since the symbol table isn't necessarily defined).
https://wiki.osdev.org/ELF_Tutorial
i was under impression that an elf file theoretically can contain many symbol tables,
but i'm not sure + not sure if they are handled correctly anyway,
so yeah, i agree, I will use obj->SymbolTable.
Repository:
rL LLVM
https://reviews.llvm.org/D46029
More information about the llvm-commits
mailing list