Changeset View
Changeset View
Standalone View
Standalone View
head/contrib/llvm/tools/lld/ELF/Writer.cpp
Show First 20 Lines • Show All 1,650 Lines • ▼ Show 20 Lines | if (Config->EMachine == EM_RISCV) | ||||
if (!dyn_cast_or_null<Defined>(Symtab->find("__global_pointer$"))) | if (!dyn_cast_or_null<Defined>(Symtab->find("__global_pointer$"))) | ||||
addOptionalRegular("__global_pointer$", findSection(".sdata"), 0x800); | addOptionalRegular("__global_pointer$", findSection(".sdata"), 0x800); | ||||
// This responsible for splitting up .eh_frame section into | // This responsible for splitting up .eh_frame section into | ||||
// pieces. The relocation scan uses those pieces, so this has to be | // pieces. The relocation scan uses those pieces, so this has to be | ||||
// earlier. | // earlier. | ||||
finalizeSynthetic(In.EhFrame); | finalizeSynthetic(In.EhFrame); | ||||
for (Symbol *S : Symtab->getSymbols()) { | for (Symbol *S : Symtab->getSymbols()) | ||||
if (!S->IsPreemptible) | S->IsPreemptible |= computeIsPreemptible(*S); | ||||
S->IsPreemptible = computeIsPreemptible(*S); | |||||
if (S->isGnuIFunc() && Config->ZIfuncnoplt) | |||||
S->ExportDynamic = true; | |||||
} | |||||
// 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. | ||||
if (!Config->Relocatable) | if (!Config->Relocatable) | ||||
forEachRelSec(scanRelocations<ELFT>); | forEachRelSec(scanRelocations<ELFT>); | ||||
addIRelativeRelocs(); | |||||
if (In.Plt && !In.Plt->empty()) | if (In.Plt && !In.Plt->empty()) | ||||
In.Plt->addSymbols(); | In.Plt->addSymbols(); | ||||
if (In.Iplt && !In.Iplt->empty()) | if (In.Iplt && !In.Iplt->empty()) | ||||
In.Iplt->addSymbols(); | In.Iplt->addSymbols(); | ||||
if (!Config->AllowShlibUndefined) { | if (!Config->AllowShlibUndefined) { | ||||
// Error on undefined symbols in a shared object, if all of its DT_NEEDED | // Error on undefined symbols in a shared object, if all of its DT_NEEDED | ||||
▲ Show 20 Lines • Show All 868 Lines • Show Last 20 Lines |