diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
commit | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch) | |
tree | 64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | |
parent | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff) | |
download | ydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp')
-rw-r--r-- | contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index 03e62bf025..28e1faab5a 100644 --- a/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/contrib/libs/llvm12/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -954,8 +954,8 @@ void RuntimeDyldELF::resolveRelocation(const SectionEntry &Section, resolveARMRelocation(Section, Offset, (uint32_t)(Value & 0xffffffffL), Type, (uint32_t)(Addend & 0xffffffffL)); break; - case Triple::ppc: // Fall through. - case Triple::ppcle: + case Triple::ppc: // Fall through. + case Triple::ppcle: resolvePPC32Relocation(Section, Offset, Value, Type, Addend); break; case Triple::ppc64: // Fall through. @@ -1670,33 +1670,33 @@ RuntimeDyldELF::processRelocationRef( if (Value.SymbolName) { // This is a call to an external function. // Look for an existing stub. - SectionEntry *Section = &Sections[SectionID]; + SectionEntry *Section = &Sections[SectionID]; StubMap::const_iterator i = Stubs.find(Value); uintptr_t StubAddress; if (i != Stubs.end()) { - StubAddress = uintptr_t(Section->getAddress()) + i->second; + StubAddress = uintptr_t(Section->getAddress()) + i->second; LLVM_DEBUG(dbgs() << " Stub function found\n"); } else { // Create a new stub function (equivalent to a PLT entry). LLVM_DEBUG(dbgs() << " Create a new stub function\n"); - uintptr_t BaseAddress = uintptr_t(Section->getAddress()); + uintptr_t BaseAddress = uintptr_t(Section->getAddress()); uintptr_t StubAlignment = getStubAlignment(); StubAddress = - (BaseAddress + Section->getStubOffset() + StubAlignment - 1) & + (BaseAddress + Section->getStubOffset() + StubAlignment - 1) & -StubAlignment; unsigned StubOffset = StubAddress - BaseAddress; Stubs[Value] = StubOffset; createStubFunction((uint8_t *)StubAddress); // Bump our stub offset counter - Section->advanceStubOffset(getMaxStubSize()); + Section->advanceStubOffset(getMaxStubSize()); // Allocate a GOT Entry uint64_t GOTOffset = allocateGOTEntries(1); - // This potentially creates a new Section which potentially - // invalidates the Section pointer, so reload it. - Section = &Sections[SectionID]; + // This potentially creates a new Section which potentially + // invalidates the Section pointer, so reload it. + Section = &Sections[SectionID]; // The load of the GOT address has an addend of -4 resolveGOTOffsetRelocation(SectionID, StubOffset + 2, GOTOffset - 4, @@ -1709,7 +1709,7 @@ RuntimeDyldELF::processRelocationRef( } // Make the target call a call into the stub table. - resolveRelocation(*Section, Offset, StubAddress, ELF::R_X86_64_PC32, + resolveRelocation(*Section, Offset, StubAddress, ELF::R_X86_64_PC32, Addend); } else { RelocationEntry RE(SectionID, Offset, ELF::R_X86_64_PC32, Value.Addend, |