[PATCH] D33680: [ELF] - Resolve references properly when using .symver directive
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 28 12:29:53 PDT 2017
ruiu added inline comments.
================
Comment at: ELF/SymbolTable.cpp:742-743
+ // but also undefined unversioned symbols with name <name>.
+ SymbolBody *Old = find(Body->getName());
+ if (Old && Old->isUndefined()) {
+ auto *D = cast<DefinedRegular>(Body);
----------------
Old doesn't sound like a good name as it is not an old symbol. Since the scope of this variable is very small, just S would be enough.
================
Comment at: ELF/SymbolTable.cpp:745-746
+ auto *D = cast<DefinedRegular>(Body);
+ addRegular(D->getName(), D->StOther, D->Type, D->Value, D->Size,
+ D->symbol()->Binding, D->Section, D->File);
+ }
----------------
I added Symbol::copyBody, so please use that function.
https://reviews.llvm.org/D33680
More information about the llvm-commits
mailing list