mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 19:49:36 +00:00
Continue early to reduce indentation.
llvm-svn: 250096
This commit is contained in:
parent
126d08f891
commit
bb3c33609b
@ -35,30 +35,31 @@ void InputSection<ELFT>::relocate(
|
|||||||
for (const RelType &RI : Rels) {
|
for (const RelType &RI : Rels) {
|
||||||
uint32_t SymIndex = RI.getSymbol(IsMips64EL);
|
uint32_t SymIndex = RI.getSymbol(IsMips64EL);
|
||||||
uint32_t Type = RI.getType(IsMips64EL);
|
uint32_t Type = RI.getType(IsMips64EL);
|
||||||
uintX_t SymVA;
|
|
||||||
|
|
||||||
// Handle relocations for local symbols -- they never get
|
// Handle relocations for local symbols -- they never get
|
||||||
// resolved so we don't allocate a SymbolBody.
|
// resolved so we don't allocate a SymbolBody.
|
||||||
const Elf_Shdr *SymTab = File.getSymbolTable();
|
const Elf_Shdr *SymTab = File.getSymbolTable();
|
||||||
if (SymIndex < SymTab->sh_info) {
|
if (SymIndex < SymTab->sh_info) {
|
||||||
SymVA = getLocalRelTarget(File, RI);
|
uintX_t SymVA = getLocalRelTarget(File, RI);
|
||||||
} else {
|
Target->relocateOne(Buf, reinterpret_cast<const void *>(&RI), Type,
|
||||||
SymbolBody &Body = *File.getSymbolBody(SymIndex)->repl();
|
BaseAddr, SymVA);
|
||||||
SymVA = getSymVA<ELFT>(Body);
|
continue;
|
||||||
if (Target->relocNeedsPlt(Type, Body)) {
|
|
||||||
SymVA = Out<ELFT>::Plt->getEntryAddr(Body);
|
|
||||||
Type = Target->getPCRelReloc();
|
|
||||||
} else if (Target->relocNeedsGot(Type, Body)) {
|
|
||||||
SymVA = Out<ELFT>::Got->getEntryAddr(Body);
|
|
||||||
Type = Target->getGotRefReloc();
|
|
||||||
} else if (Target->relocPointsToGot(Type)) {
|
|
||||||
SymVA = Out<ELFT>::Got->getVA();
|
|
||||||
Type = Target->getPCRelReloc();
|
|
||||||
} else if (isa<SharedSymbol<ELFT>>(Body)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SymbolBody &Body = *File.getSymbolBody(SymIndex)->repl();
|
||||||
|
uintX_t SymVA = getSymVA<ELFT>(Body);
|
||||||
|
if (Target->relocNeedsPlt(Type, Body)) {
|
||||||
|
SymVA = Out<ELFT>::Plt->getEntryAddr(Body);
|
||||||
|
Type = Target->getPCRelReloc();
|
||||||
|
} else if (Target->relocNeedsGot(Type, Body)) {
|
||||||
|
SymVA = Out<ELFT>::Got->getEntryAddr(Body);
|
||||||
|
Type = Target->getGotRefReloc();
|
||||||
|
} else if (Target->relocPointsToGot(Type)) {
|
||||||
|
SymVA = Out<ELFT>::Got->getVA();
|
||||||
|
Type = Target->getPCRelReloc();
|
||||||
|
} else if (isa<SharedSymbol<ELFT>>(Body)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
Target->relocateOne(Buf, reinterpret_cast<const void *>(&RI), Type,
|
Target->relocateOne(Buf, reinterpret_cast<const void *>(&RI), Type,
|
||||||
BaseAddr, SymVA);
|
BaseAddr, SymVA);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user