[lld] [ELF] Demote symbols in /DISCARD/ discarded sections to Undefined (PR #69295)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 17 11:41:52 PDT 2023
================
@@ -316,12 +316,13 @@ void elf::maybeWarnUnorderableSymbol(const Symbol *sym) {
if (!config->warnSymbolOrdering)
return;
- // If UnresolvedPolicy::Ignore is used, no "undefined symbol" error/warning
- // is emitted. It makes sense to not warn on undefined symbols.
+ // If UnresolvedPolicy::Ignore is used, no "undefined symbol" error/warning is
+ // emitted. It makes sense to not warn on undefined symbols (excluding those
+ // demoted by demoteSymbolsInDiscardedSections).
----------------
MaskRay wrote:
Thanks for the catch. I think both demoteSymbols/demoteLocalSymbolsInDiscardedSections but we probably can just mention demoteSymbols.
https://github.com/llvm/llvm-project/pull/69295
More information about the llvm-commits
mailing list