diff options
author | Hans Wennborg <hans@hanshq.net> | 2017-04-21 20:58:12 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2017-04-21 20:58:12 +0000 |
commit | cb3e81071495dd2f63af38f6b50945a47939f9d7 (patch) | |
tree | 7826b28b7b5818fd416502e8c46a184c8188ce39 /llvm/lib/Support/DynamicLibrary.cpp | |
parent | 79873efcfb3ae8c4da5f8c6855105a9e496ce1f7 (diff) | |
download | llvm-cb3e81071495dd2f63af38f6b50945a47939f9d7.zip llvm-cb3e81071495dd2f63af38f6b50945a47939f9d7.tar.gz llvm-cb3e81071495dd2f63af38f6b50945a47939f9d7.tar.bz2 |
X86: Don't emit zero-byte functions on Windows
Empty functions can lead to duplicate entries in the Guard CF Function
Table of a binary due to multiple functions sharing the same RVA,
causing the kernel to refuse to load that binary.
We had a terrific bug due to this in Chromium.
It turns out we were already doing this for Mach-O in certain
situations. This patch expands the code for that in
AsmPrinter::EmitFunctionBody() and renames
TargetInstrInfo::getNoopForMachoTarget() to simply getNoop() since it
seems it was used for not just Mach-O anyway.
Differential Revision: https://reviews.llvm.org/D32330
llvm-svn: 301040
Diffstat (limited to 'llvm/lib/Support/DynamicLibrary.cpp')
0 files changed, 0 insertions, 0 deletions