[PATCH] D38872: [ExecutionEngine] Correct the size of a write in a COFF i386 relocation
Alex Langford via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 12 18:43:56 PDT 2017
xiaobai created this revision.
We want to be writing a 32bit value, so we should be writing 4 bytes
instead of 2.
https://reviews.llvm.org/D38872
Files:
lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h
Index: lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h
===================================================================
--- lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h
+++ lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h
@@ -209,7 +209,7 @@
DEBUG(dbgs() << "\t\tOffset: " << RE.Offset
<< " RelType: IMAGE_REL_I386_SECREL Value: " << RE.Addend
<< '\n');
- writeBytesUnaligned(RE.Addend, Target, 2);
+ writeBytesUnaligned(RE.Addend, Target, 4);
break;
default:
llvm_unreachable("unsupported relocation type");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38872.118877.patch
Type: text/x-patch
Size: 632 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171013/f24067b7/attachment.bin>
More information about the llvm-commits
mailing list