[PATCH] D41089: [COFF] Don't error out on undefined references to __enclave_config
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 11 12:54:08 PST 2017
mstorsjo created this revision.
This is required for linking the CRT from MSVC 2017 15.5.
While this is unrelated to guardcf.test in general, it's the same kind of issue (avoiding errors due to undefined symbols), so I added the symbol to that test instead of creating a completely new one.
https://reviews.llvm.org/D41089
Files:
COFF/Driver.cpp
test/COFF/guardcf.test
Index: test/COFF/guardcf.test
===================================================================
--- test/COFF/guardcf.test
+++ test/COFF/guardcf.test
@@ -71,4 +71,10 @@
SimpleType: IMAGE_SYM_TYPE_NULL
ComplexType: IMAGE_SYM_DTYPE_NULL
StorageClass: IMAGE_SYM_CLASS_EXTERNAL
+ - Name: __enclave_config
+ Value: 0
+ SectionNumber: 0
+ SimpleType: IMAGE_SYM_TYPE_NULL
+ ComplexType: IMAGE_SYM_DTYPE_NULL
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL
...
Index: COFF/Driver.cpp
===================================================================
--- COFF/Driver.cpp
+++ COFF/Driver.cpp
@@ -1170,6 +1170,8 @@
Symtab->addAbsolute(mangle("__guard_iat_table"), 0);
Symtab->addAbsolute(mangle("__guard_longjmp_count"), 0);
Symtab->addAbsolute(mangle("__guard_longjmp_table"), 0);
+ // Needed for MSVC 2017 15.5 CRT.
+ Symtab->addAbsolute(mangle("__enclave_config"), 0);
// This code may add new undefined symbols to the link, which may enqueue more
// symbol resolution tasks, so we need to continue executing tasks until we
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41089.126427.patch
Type: text/x-patch
Size: 1111 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171211/38561234/attachment.bin>
More information about the llvm-commits
mailing list