Do not call computeIsPreemptible() if its result is discarded. NFC.
llvm-svn: 345208
This commit is contained in:
parent
9c6c201b58
commit
444363e931
|
@ -1559,6 +1559,7 @@ static void removeUnusedSyntheticSections() {
|
||||||
// with the same name defined in other ELF executable or DSO.
|
// with the same name defined in other ELF executable or DSO.
|
||||||
static bool computeIsPreemptible(const Symbol &B) {
|
static bool computeIsPreemptible(const Symbol &B) {
|
||||||
assert(!B.isLocal());
|
assert(!B.isLocal());
|
||||||
|
|
||||||
// Only symbols that appear in dynsym can be preempted.
|
// Only symbols that appear in dynsym can be preempted.
|
||||||
if (!B.includeInDynsym())
|
if (!B.includeInDynsym())
|
||||||
return false;
|
return false;
|
||||||
|
@ -1624,7 +1625,8 @@ template <class ELFT> void Writer<ELFT>::finalizeSections() {
|
||||||
finalizeSynthetic(In.EhFrame);
|
finalizeSynthetic(In.EhFrame);
|
||||||
|
|
||||||
for (Symbol *S : Symtab->getSymbols())
|
for (Symbol *S : Symtab->getSymbols())
|
||||||
S->IsPreemptible |= computeIsPreemptible(*S);
|
if (!S->IsPreemptible)
|
||||||
|
S->IsPreemptible = computeIsPreemptible(*S);
|
||||||
|
|
||||||
// Scan relocations. This must be done after every symbol is declared so that
|
// Scan relocations. This must be done after every symbol is declared so that
|
||||||
// we can correctly decide if a dynamic relocation is needed.
|
// we can correctly decide if a dynamic relocation is needed.
|
||||||
|
|
Loading…
Reference in New Issue