File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -461,8 +461,9 @@ template <class ELFT> void ICF<ELFT>::run() {
461
461
// Compute isPreemptible early. We may add more symbols later, so this loop
462
462
// cannot be merged with the later computeIsPreemptible() pass which is used
463
463
// by scanRelocations().
464
- for (Symbol *sym : symtab->symbols ())
465
- sym->isPreemptible = computeIsPreemptible (*sym);
464
+ if (config->hasDynSymTab )
465
+ for (Symbol *sym : symtab->symbols ())
466
+ sym->isPreemptible = computeIsPreemptible (*sym);
466
467
467
468
// Two text sections may have identical content and relocations but different
468
469
// LSDA, e.g. the two functions may have catch blocks of different types. If a
Original file line number Diff line number Diff line change @@ -279,8 +279,6 @@ uint8_t Symbol::computeBinding() const {
279
279
}
280
280
281
281
bool Symbol::includeInDynsym () const {
282
- if (!config->hasDynSymTab )
283
- return false ;
284
282
if (computeBinding () == STB_LOCAL)
285
283
return false ;
286
284
if (!isDefined () && !isCommon ())
Original file line number Diff line number Diff line change @@ -1912,8 +1912,9 @@ template <class ELFT> void Writer<ELFT>::finalizeSections() {
1912
1912
finalizeSynthetic (part.ehFrame .get ());
1913
1913
}
1914
1914
1915
- for (Symbol *sym : symtab->symbols ())
1916
- sym->isPreemptible = computeIsPreemptible (*sym);
1915
+ if (config->hasDynSymTab )
1916
+ for (Symbol *sym : symtab->symbols ())
1917
+ sym->isPreemptible = computeIsPreemptible (*sym);
1917
1918
1918
1919
// Change values of linker-script-defined symbols from placeholders (assigned
1919
1920
// by declareSymbols) to actual definitions.
You can’t perform that action at this time.
0 commit comments