[PATCH] D95512: [RuntimeDyld] Implemented relocation for ELF::R_X86_64_GOTPC32
Moritz Sichert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 6 01:31:36 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf6873786034a: [RuntimeDyld] Implemented relocation for ELF::R_X86_64_GOTPC32 (authored by MoritzS).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95512/new/
https://reviews.llvm.org/D95512
Files:
llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
Index: llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
===================================================================
--- llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
+++ llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
@@ -1813,10 +1813,13 @@
addRelocationForSymbol(RE, Value.SymbolName);
else
addRelocationForSection(RE, Value.SectionID);
- } else if (RelType == ELF::R_X86_64_GOTPC64) {
+ } else if (RelType == ELF::R_X86_64_GOTPC32) {
// Materialize the address of the base of the GOT relative to the PC.
// This doesn't create a GOT entry, but it does mean we need a GOT
// section.
+ (void)allocateGOTEntries(0);
+ resolveGOTOffsetRelocation(SectionID, Offset, Addend, ELF::R_X86_64_PC32);
+ } else if (RelType == ELF::R_X86_64_GOTPC64) {
(void)allocateGOTEntries(0);
resolveGOTOffsetRelocation(SectionID, Offset, Addend, ELF::R_X86_64_PC64);
} else if (RelType == ELF::R_X86_64_GOTOFF64) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95512.370857.patch
Type: text/x-patch
Size: 1012 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210906/68c6e677/attachment.bin>
More information about the llvm-commits
mailing list