[PATCH] D46217: [llvm-objcopy] Add --weaken option
Paul Semel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 27 16:27:32 PDT 2018
paulsemel added inline comments.
================
Comment at: tools/llvm-objcopy/llvm-objcopy.cpp:339
+ if (Config.Weaken && Sym.Binding == STB_GLOBAL &&
+ Sym.NameIndex != STN_UNDEF)
+ Sym.Binding = STB_WEAK;
----------------
jakehehrlich wrote:
> Why is this NameIndex check here?
This check tells me whether the symbol is defined or not. If not, it means that it's a relocation.
In this case (as GNU objdump does to), I'm not marking the symbol.
Repository:
rL LLVM
https://reviews.llvm.org/D46217
More information about the llvm-commits
mailing list