summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2013-11-15 22:11:43 +0000
committerRui Ueyama <ruiu@google.com>2013-11-15 22:11:43 +0000
commitfbd82d0813b32389ec194824b10ef12d864766f6 (patch)
tree30ca95ab36385d9ee006c49dd37e924c286c4043 /lld/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp
parent515b1daad3a79f3e9324ee72aad0c62c29eca83c (diff)
downloadbcm5719-llvm-fbd82d0813b32389ec194824b10ef12d864766f6.tar.gz
bcm5719-llvm-fbd82d0813b32389ec194824b10ef12d864766f6.zip
[PECOFF] Use INT3 instead of NOP.
This patch does not change the meaning of the program, but if something's wrong in the linker or the compiler and the control reaches to the gap of imported function table, it will stop immediately because of the presence of INT3. If NOP, it'd fall through to the next call instruction, which is usually a completely foreign function call. llvm-svn: 194860
Diffstat (limited to 'lld/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp')
-rw-r--r--lld/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp b/lld/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp
index abf1f646116..ae8382c782a 100644
--- a/lld/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp
+++ b/lld/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp
@@ -152,7 +152,7 @@ namespace {
uint8_t FuncAtomContent[] = {
0xff, 0x25, 0x00, 0x00, 0x00, 0x00, // jmp *0x0
- 0x90, 0x90 // nop; nop
+ 0xcc, 0xcc // int 3; int 3
};
/// The defined atom for jump table.
OpenPOWER on IntegriCloud