[PATCH] D22664: [ELF/Linkerscript] Define an absolute if we find an undefined during symbol assignment
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 23 04:04:28 PDT 2016
ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: ELF/LinkerScript.cpp:536-539
@@ -535,5 +535,6 @@
- if (Symtab<ELFT>::X->find(Cmd->Name) == nullptr)
+ SymbolBody *B = Symtab<ELFT>::X->find(Cmd->Name);
+ if (B == nullptr || B->isUndefined())
Symtab<ELFT>::X->addAbsolute(Cmd->Name,
Cmd->Hidden ? STV_HIDDEN : STV_DEFAULT);
else
----------------
I think we usually write `!B` instead of `B == nullptr`.
https://reviews.llvm.org/D22664
More information about the llvm-commits
mailing list