[lld] r320462 - [COFF] Don't error out on undefined references to __enclave_config
Martin Storsjo via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 12 00:22:29 PST 2017
Author: mstorsjo
Date: Tue Dec 12 00:22:29 2017
New Revision: 320462
URL: http://llvm.org/viewvc/llvm-project?rev=320462&view=rev
Log:
[COFF] Don't error out on undefined references to __enclave_config
This is required for linking the CRT from MSVC 2017 15.5.
Differential Revision: https://reviews.llvm.org/D41089
Modified:
lld/trunk/COFF/Driver.cpp
lld/trunk/test/COFF/guardcf.test
Modified: lld/trunk/COFF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.cpp?rev=320462&r1=320461&r2=320462&view=diff
==============================================================================
--- lld/trunk/COFF/Driver.cpp (original)
+++ lld/trunk/COFF/Driver.cpp Tue Dec 12 00:22:29 2017
@@ -1167,6 +1167,8 @@ void LinkerDriver::link(ArrayRef<const c
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
Modified: lld/trunk/test/COFF/guardcf.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/guardcf.test?rev=320462&r1=320461&r2=320462&view=diff
==============================================================================
--- lld/trunk/test/COFF/guardcf.test (original)
+++ lld/trunk/test/COFF/guardcf.test Tue Dec 12 00:22:29 2017
@@ -71,4 +71,10 @@ symbols:
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
...
More information about the llvm-commits
mailing list