forked from OSchip/llvm-project
[ELF] Simplify includeInSymtab. NFC
This commit is contained in:
parent
bb4eacdb70
commit
38e6361d84
|
@ -675,14 +675,9 @@ static bool includeInSymtab(const Symbol &b) {
|
||||||
if (!sec)
|
if (!sec)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Exclude symbols pointing to garbage-collected sections.
|
|
||||||
if (isa<InputSectionBase>(sec) && !sec->isLive())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (auto *s = dyn_cast<MergeInputSection>(sec))
|
if (auto *s = dyn_cast<MergeInputSection>(sec))
|
||||||
if (!s->getSectionPiece(d->value)->live)
|
return s->getSectionPiece(d->value)->live;
|
||||||
return false;
|
return sec->isLive();
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return b.used || !config->gcSections;
|
return b.used || !config->gcSections;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue