Skip to content

Commit 202a0a1

Browse files
committed
[JITLink] fix i668 R_386_32 relocation value
Most relocations involve adding the value at the location with a value taken from elsewhere. This one was missing the addend taken from the location. Other relocations may be missing this too?
1 parent 8ee7d91 commit 202a0a1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/ExecutionEngine/JITLink/ELF_i386.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ class ELFLinkGraphBuilder_i386 : public ELFLinkGraphBuilder<ELFT> {
186186
int64_t Addend = 0;
187187

188188
switch (*Kind) {
189+
case i386::EdgeKind_i386::Pointer32:
189190
case i386::EdgeKind_i386::Delta32: {
190191
const char *FixupContent = BlockToFix.getContent().data() +
191192
(FixupAddress - BlockToFix.getAddress());

0 commit comments

Comments
 (0)