[PATCH] D53044: [ELF] Don't warn on undefined symbols when reading call graph profile
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 10 10:15:46 PDT 2018
MaskRay added inline comments.
================
Comment at: ELF/Driver.cpp:689
+ Config->UnresolvedSymbols != UnresolvedPolicy::Ignore)
+ warnUnorderableSymbol(Sym);
if (const auto *SymD = dyn_cast<Defined>(Sym))
----------------
grimar wrote:
> It reads strangely: "If a symbol is not undefined (or ...) then warnUnorderableSymbol"
> Makes think that we reporting a warning for defined symbols.
>
> I think if that check should be made it should be inside the `warnUnorderableSymbol`
>
> Also, should it check the `if (Config->Shared)` condition at some point?
> I think if that check should be made it should be inside the warnUnorderableSymbol
Then this option will also affect --symbol-ordering-file= (ld.bfd implements this option but gold doesn't. ld.bfd does not warn undefined symbols.). I think this also seems fine.
> `Config->Shared`
Checking `UnresolvedPolicy::Ignore` looks good enough as this is also a symbol resolution process.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D53044
More information about the llvm-commits
mailing list