<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Hi Red, in Intel® Software Guard Extensions (Intel® SGX)</title>
    <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123888#M1619</link>
    <description>&lt;P&gt;Hi Red,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The majority of Microsoft* Visual C++ intrinsics can be called inside the enclave, and an enclave project can include Microsoft* standard &amp;lt;intrin.h&amp;gt; directly with few restrictions. For example, you should not use intrinsics that generate instructions unsupported inside an enclave. All unsup-ported intrinsic functions generally fall into following categories:&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;I/O related functions.&lt;/LI&gt;
	&lt;LI&gt;Instructions requiring ring 0 privileges or can change privilege level.&lt;/LI&gt;
	&lt;LI&gt;OS or system related functions.&lt;/LI&gt;
	&lt;LI&gt;Intrinsics which are considered unprotected and encryption alternatives.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;1. There are few requirements for including Microsoft* standard &amp;lt;intrin.h&amp;gt;:&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;&amp;nbsp;Add $(VCInstallDir)include;$(IncludePath) to Include Directories.&lt;/LI&gt;
	&lt;LI&gt;&amp;nbsp;Set Ignore Standard Include Path to No.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;2. Use /Oi or #pragma intrinsic(…) to enable MSVC intrinsics.&lt;/P&gt;

&lt;P&gt;The &amp;lt;sgx_intrin.h&amp;gt; also provides compile warnings for unsupported intrinsics.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;NOTE:&lt;/STRONG&gt;&lt;BR /&gt;
	The Intel® SGX SDK has stub implementations, sgx_intrin.h for the intrinsics that are not valid within an enclave. These stubs will cause a compiler warning when an unsupported instrinsic is used.&lt;/P&gt;

&lt;P&gt;Refer page no 225 and Table 18 Unsupported MSVC Compiler Intrinsics in&amp;nbsp;Intel-SGX-SDK-Users-Guide-for-Windows-OS.pdf&lt;/P&gt;

&lt;P&gt;Thanks and Regards,&lt;BR /&gt;
	Surenthar Selvaraj&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jul 2016 08:50:44 GMT</pubDate>
    <dc:creator>Surenthar_S_Intel</dc:creator>
    <dc:date>2016-07-13T08:50:44Z</dc:date>
    <item>
      <title>Intel SGX with Intrinsics</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123887#M1618</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm importing a library to be compiled for SGX (to be loaded into an enclave). The thing is the library uses&amp;nbsp;&lt;SPAN style="font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Menlo, Monaco, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace, sans-serif; font-size: 1em; line-height: 1.5;"&gt;intrin.h&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;&amp;nbsp;which is not available in the SGX SDK. But I found &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Menlo, Monaco, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace, sans-serif; font-size: 13.008px; line-height: 19.512px;"&gt;sgx_intrin.h&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;&amp;nbsp;file and thought might replace the original header file. The problem is that &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px; font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Menlo, Monaco, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace, sans-serif; line-height: 19.512px;"&gt;sgx_intrin.h&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;&amp;nbsp;file has the following block:&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;/* Deprecated MSVC Intrinsics */
#if defined(_MSC_VER)
#include &amp;lt;intrin.h&amp;gt; /* Include MS intrin.h */
#include &amp;lt;sgx_cpuid.h&amp;gt;
&lt;/PRE&gt;

&lt;P&gt;It includes &lt;SPAN style="font-family: Consolas, &amp;quot;Lucida Console&amp;quot;, Menlo, Monaco, &amp;quot;DejaVu Sans Mono&amp;quot;, monospace, sans-serif; font-size: 13.008px; line-height: 19.512px;"&gt;intrin.h&lt;/SPAN&gt;&amp;nbsp;file which does not exist in the SGX SDK. How can I resolve this issue? Should I just copy and paste the missing header file from MS VS include folder?&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
	Rad&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 12:27:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123887#M1618</guid>
      <dc:creator>Rad_A_</dc:creator>
      <dc:date>2016-07-12T12:27:37Z</dc:date>
    </item>
    <item>
      <title>Hi Red,</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123888#M1619</link>
      <description>&lt;P&gt;Hi Red,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The majority of Microsoft* Visual C++ intrinsics can be called inside the enclave, and an enclave project can include Microsoft* standard &amp;lt;intrin.h&amp;gt; directly with few restrictions. For example, you should not use intrinsics that generate instructions unsupported inside an enclave. All unsup-ported intrinsic functions generally fall into following categories:&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;I/O related functions.&lt;/LI&gt;
	&lt;LI&gt;Instructions requiring ring 0 privileges or can change privilege level.&lt;/LI&gt;
	&lt;LI&gt;OS or system related functions.&lt;/LI&gt;
	&lt;LI&gt;Intrinsics which are considered unprotected and encryption alternatives.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;1. There are few requirements for including Microsoft* standard &amp;lt;intrin.h&amp;gt;:&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;&amp;nbsp;Add $(VCInstallDir)include;$(IncludePath) to Include Directories.&lt;/LI&gt;
	&lt;LI&gt;&amp;nbsp;Set Ignore Standard Include Path to No.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;2. Use /Oi or #pragma intrinsic(…) to enable MSVC intrinsics.&lt;/P&gt;

&lt;P&gt;The &amp;lt;sgx_intrin.h&amp;gt; also provides compile warnings for unsupported intrinsics.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;NOTE:&lt;/STRONG&gt;&lt;BR /&gt;
	The Intel® SGX SDK has stub implementations, sgx_intrin.h for the intrinsics that are not valid within an enclave. These stubs will cause a compiler warning when an unsupported instrinsic is used.&lt;/P&gt;

&lt;P&gt;Refer page no 225 and Table 18 Unsupported MSVC Compiler Intrinsics in&amp;nbsp;Intel-SGX-SDK-Users-Guide-for-Windows-OS.pdf&lt;/P&gt;

&lt;P&gt;Thanks and Regards,&lt;BR /&gt;
	Surenthar Selvaraj&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 08:50:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123888#M1619</guid>
      <dc:creator>Surenthar_S_Intel</dc:creator>
      <dc:date>2016-07-13T08:50:44Z</dc:date>
    </item>
    <item>
      <title>Quote:Surenthar Selvaraj.</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123889#M1620</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Surenthar Selvaraj. (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Hi Red,&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;The majority of Microsoft* Visual C++ intrinsics can be called inside the enclave, and an enclave project can include Microsoft* standard &amp;lt;intrin.h&amp;gt; directly with few restrictions. For example, you should not use intrinsics that generate instructions unsupported inside an enclave. All unsup-ported intrinsic functions generally fall into following categories:&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;I/O related functions.&lt;/LI&gt;
	&lt;LI&gt;Instructions requiring ring 0 privileges or can change privilege level.&lt;/LI&gt;
	&lt;LI&gt;OS or system related functions.&lt;/LI&gt;
	&lt;LI&gt;Intrinsics which are considered unprotected and encryption alternatives.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;1. There are few requirements for including Microsoft* standard &amp;lt;intrin.h&amp;gt;:&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;&amp;nbsp;Add $(VCInstallDir)include;$(IncludePath) to Include Directories.&lt;/LI&gt;
	&lt;LI&gt;&amp;nbsp;Set Ignore Standard Include Path to No.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;2. Use /Oi or #pragma intrinsic(…) to enable MSVC intrinsics.&lt;/P&gt;

&lt;P&gt;The &amp;lt;sgx_intrin.h&amp;gt; also provides compile warnings for unsupported intrinsics.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;NOTE:&lt;/STRONG&gt;&lt;BR /&gt;
	The Intel® SGX SDK has stub implementations, sgx_intrin.h for the intrinsics that are not valid within an enclave. These stubs will cause a compiler warning when an unsupported instrinsic is used.&lt;/P&gt;

&lt;P&gt;Refer page no 225 and Table 18 Unsupported MSVC Compiler Intrinsics in&amp;nbsp;Intel-SGX-SDK-Users-Guide-for-Windows-OS.pdf&lt;/P&gt;

&lt;P&gt;Thanks and Regards,&lt;BR /&gt;
	Surenthar Selvaraj&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Thanks&amp;nbsp;Surenthar for the reply. I tried it, but it failed with:&lt;/P&gt;

&lt;PRE class="brush:plain;"&gt;Error    2    error MSB3073: The command ""C:\Program Files (x86)\Intel\IntelSGXSDK\bin\win32\release\sgx_sign.exe" sign -key "enclave_private.pem" -enclave "enclave.dll" -out "enclave.signed.dll" -config "enclave.config.xml" :VCEnd" exited with code -1.&lt;/PRE&gt;

&lt;P&gt;I found this &lt;A href="https://software.intel.com/en-us/node/637831" target="_blank"&gt;post&lt;/A&gt;&amp;nbsp;and tried to add only needed header files (not to add VC include folder to the project). So I created a separate folder in the IntelSGXSDK\include\ folder called "&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;vs12&lt;/SPAN&gt;" and added the following files:&lt;/P&gt;

&lt;PRE class="brush:plain;"&gt;ammintrin.h
ConcurrencySal.h
crtdefs.h
emmintrin.h
immintrin.h
intrin.h
mm3dnow.h
mmintrin.h
nmmintrin.h
pmmintrin.h
sal.h
setjmp.h
smmintrin.h
tmmintrin.h
vadefs.h
wmmintrin.h
xmmintrin.h&lt;/PRE&gt;

&lt;P&gt;1. Then I found&amp;nbsp;&lt;STRONG&gt;#include &amp;lt;malloc.h&amp;gt;&lt;/STRONG&gt;&amp;nbsp;in&amp;nbsp;&lt;STRONG&gt;xmmintrin.h&lt;/STRONG&gt;&amp;nbsp;file. There is no such file in the SGX SDK and based on the post (mentioned above), I should not used the standard "malloc.h". Am I missing something?&lt;/P&gt;

&lt;P&gt;2. Since I didn't need&amp;nbsp;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;"malloc.h" functionalities, I commented the following lines in&amp;nbsp;&lt;/SPAN&gt;xmmintrin.h file&amp;nbsp;(to be able to get the code compiled):&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;...

#ifndef _INC_MALLOC
/* pick up _mm_malloc() and _mm_free() */
//#include &amp;lt;malloc.h&amp;gt;
#endif  /* _INC_MALLOC */
#endif  /* __ICL */

...

#ifdef __ICL
//extern void* __cdecl _mm_malloc(size_t _Siz, size_t _Al);
//extern void __cdecl _mm_free(void *_P);
#endif  /* __ICL */

...&lt;/PRE&gt;

&lt;P&gt;But still cannot get the project built (the error mentioned above). What does that error mean? How can I resolve it?&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
	Rad&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 12:10:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123889#M1620</guid>
      <dc:creator>Rad_A_</dc:creator>
      <dc:date>2016-07-14T12:10:05Z</dc:date>
    </item>
    <item>
      <title>Hi Rad,</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123890#M1621</link>
      <description>&lt;P&gt;Hi Rad,&lt;/P&gt;

&lt;P&gt;Could you please share the code with us.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;Thanks and Regards,&lt;/SPAN&gt;&lt;BR style="font-size: 12px; line-height: 18px;" /&gt;
	&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;Surenthar Selvaraj&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 10:57:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123890#M1621</guid>
      <dc:creator>Surenthar_S_Intel</dc:creator>
      <dc:date>2016-07-15T10:57:38Z</dc:date>
    </item>
    <item>
      <title>//Enclave1.cpp</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123891#M1622</link>
      <description>&lt;PRE class="brush:cpp;"&gt;//Enclave1.cpp
#include "Enclave1_t.h"

#include "sgx_trts.h"

#include "sgx_intrin.h"

void foo () {
  int registers[4];

  __cpuid(registers, 1);
}

//---------------------------------------
//Enclave1.edl
enclave {
    trusted {
        public void foo ();
    };

    untrusted {
    };
};
&lt;/PRE&gt;

&lt;P&gt;With the mentioned configuration parameters (additional include directories, headers from VS2013, etc), and also one additional library "&lt;STRONG&gt;sgx_urts.lib&lt;/STRONG&gt;" which is needed for "&lt;STRONG&gt;_sgx_oc_cpuidex&lt;/STRONG&gt;".&lt;/P&gt;

&lt;P&gt;The above generates the same error after compiling and linking.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
	Rad&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 12:31:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123891#M1622</guid>
      <dc:creator>Rad_A_</dc:creator>
      <dc:date>2016-07-15T12:31:27Z</dc:date>
    </item>
    <item>
      <title>You could run:</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123892#M1623</link>
      <description>&lt;P&gt;You could run:&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;SPAN style="font: 13px/14.3px Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; text-align: left; color: rgb(0, 0, 0); text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; widows: 1; font-size-adjust: none; font-stretch: normal; background-color: rgb(255, 255, 255); -webkit-text-stroke-width: 0px;"&gt;"C:\Program Files (x86)\Intel\IntelSGXSDK\bin\win32\release\sgx_sign.exe" sign -key "enclave_private.pem" -enclave "enclave.dll" -out "enclave.signed.dll" -config "enclave.config.xml" &lt;/SPAN&gt;&lt;BR /&gt;
	&lt;BR /&gt;
	In a command prompt in the appropriate directory to get more information.&lt;/P&gt;

&lt;P&gt;If compile and link completed then&amp;nbsp;your enclave built properly, but&amp;nbsp;signing the enclave failed. Usually those errors happen because you are trying to sign in "Release" mode instead of "Debug" or "Pre-release". Other times it happens because the config xml file specifies something that is not supported.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 12:49:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123892#M1623</guid>
      <dc:creator>Francisco_C_Intel</dc:creator>
      <dc:date>2016-07-15T12:49:02Z</dc:date>
    </item>
    <item>
      <title>Quote:FRANCISCO C. (Intel)</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123893#M1624</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;FRANCISCO C. (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;You could run:&lt;/P&gt;

&lt;P&gt;"C:\Program Files (x86)\Intel\IntelSGXSDK\bin\win32\release\sgx_sign.exe" sign -key "enclave_private.pem" -enclave "enclave.dll" -out "enclave.signed.dll" -config "enclave.config.xml"&lt;/P&gt;

&lt;P&gt;In a command prompt in the appropriate directory to get more information.&lt;/P&gt;

&lt;P&gt;If compile and link completed then&amp;nbsp;your enclave built properly, but&amp;nbsp;signing the enclave failed. Usually those errors happen because you are trying to sign in "Release" mode instead of "Debug" or "Pre-release". Other times it happens because the config xml file specifies something that is not supported.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Thanks for the reply. The below is the output (didn't help me much to resolve the issue):&lt;/P&gt;

&lt;PRE class="brush:plain;"&gt;1&amp;gt;PostBuildEvent:
1&amp;gt;  Description: sign the enclave
1&amp;gt;EXEC : warning : undefined symbol detected.
1&amp;gt;  The input enclave file is not correct.
1&amp;gt;  Error happened while signing the enclave.
1&amp;gt;  &amp;lt;EnclaveConfiguration&amp;gt;
1&amp;gt;      &amp;lt;ProdID&amp;gt;0&amp;lt;/ProdID&amp;gt;
1&amp;gt;      &amp;lt;ISVSVN&amp;gt;0&amp;lt;/ISVSVN&amp;gt;
1&amp;gt;      &amp;lt;StackMaxSize&amp;gt;0x40000&amp;lt;/StackMaxSize&amp;gt;
1&amp;gt;      &amp;lt;HeapMaxSize&amp;gt;0x100000&amp;lt;/HeapMaxSize&amp;gt;
1&amp;gt;      &amp;lt;TCSNum&amp;gt;1&amp;lt;/TCSNum&amp;gt;
1&amp;gt;      &amp;lt;TCSPolicy&amp;gt;1&amp;lt;/TCSPolicy&amp;gt;
1&amp;gt;      &amp;lt;DisableDebug&amp;gt;0&amp;lt;/DisableDebug&amp;gt;
1&amp;gt;      &amp;lt;MiscSelect&amp;gt;0&amp;lt;/MiscSelect&amp;gt;
1&amp;gt;      &amp;lt;MiscMask&amp;gt;0xFFFFFFFF&amp;lt;/MiscMask&amp;gt;
1&amp;gt;  &amp;lt;/EnclaveConfiguration&amp;gt;
1&amp;gt;C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: The command ""C:\Program Files (x86)\Intel\IntelSGXSDK\bin\win32\release\sgx_sign.exe" sign -key "C:\works\trash\Enclave1\Enclave1\Enclave1_private.pem" -enclave "C:\works\trash\Enclave1\Debug\Enclave1.dll" -out "C:\works\trash\Enclave1\Debug\Enclave1.signed.dll" -config "C:\works\trash\Enclave1\Enclave1\Enclave1.config.xml"
1&amp;gt;C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: :VCEnd" exited with code -1.
1&amp;gt;
1&amp;gt;Build FAILED.&lt;/PRE&gt;

&lt;P&gt;Any idea? Thanks.&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
	Rad&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 12:58:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123893#M1624</guid>
      <dc:creator>Rad_A_</dc:creator>
      <dc:date>2016-07-15T12:58:00Z</dc:date>
    </item>
    <item>
      <title>"warning : undefined symbol</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123894#M1625</link>
      <description>&lt;P&gt;&lt;FONT face="Courier New"&gt;"warning : undefined symbol detected" corresponds to &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT size="1"&gt;SGX_ERROR_UNDEFINED_SYMBOL.&amp;nbsp; &lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;From the SDK User's Guide:&lt;/FONT&gt;&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;B&gt;&lt;FONT size="1"&gt;SGX_ERROR_UNDEFINED_SYMBOL&lt;/FONT&gt;&lt;/B&gt;&lt;BR /&gt;
	&lt;FONT face="Verdana,Verdana" size="1"&gt;&lt;FONT face="Verdana,Verdana" size="1"&gt;The enclave contains an import table.&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Verdana" size="1"&gt;All libraries that are linked into an enclave need to be static libraries, which means that enclaves are not allowed to have import tables. Are any of the libraries you are trying to link in DLLs?&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Verdana,Verdana" size="1"&gt;&lt;FONT face="Verdana,Verdana" size="1"&gt;(Future versions of the tool may state "warning: enclave contains an import table" instead)&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 13:18:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123894#M1625</guid>
      <dc:creator>Francisco_C_Intel</dc:creator>
      <dc:date>2016-07-15T13:18:30Z</dc:date>
    </item>
    <item>
      <title>Quote:FRANCISCO C. (Intel)</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123895#M1626</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;FRANCISCO C. (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;"warning : undefined symbol detected" corresponds to &lt;STRONG&gt;SGX_ERROR_UNDEFINED_SYMBOL.&amp;nbsp; &lt;/STRONG&gt;From the SDK User's Guide:&lt;/P&gt;

&lt;P&gt;&lt;B&gt;SGX_ERROR_UNDEFINED_SYMBOL&lt;/B&gt;&lt;BR /&gt;
	The enclave contains an import table.&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;All libraries that are linked into an enclave need to be static libraries, which means that enclaves are not allowed to have import tables. Are any of the libraries you are trying to link in DLLs?&lt;/P&gt;

&lt;P&gt;(Future versions of the tool may state "warning: enclave contains an import table" instead)&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;No. I created very simple enclave (as shown above it has nothing except one function). For the record, additional dependencies are:&lt;BR /&gt;
	&lt;STRONG&gt;sgx_trts.lib;sgx_tstdc.lib;sgx_tservice.lib;sgx_tcrypto.lib;sgx_tstdcxx.lib;sgx_urts.lib&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Please note that I added some header files to the project (though didn't add any library or such from standard VS2013). Could the issue be because of the header files (listed in &lt;A href="https://software.intel.com/en-us/forums/intel-software-guard-extensions-intel-sgx/topic/661235#comment-1878134"&gt;this&lt;/A&gt; comment)?&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
	Rad&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 13:26:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123895#M1626</guid>
      <dc:creator>Rad_A_</dc:creator>
      <dc:date>2016-07-15T13:26:33Z</dc:date>
    </item>
    <item>
      <title>You are linking the untrusted</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123896#M1627</link>
      <description>&lt;P&gt;You are linking the untrusted runtime library:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;sgx_urts.lib&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;into your (trusted) enclave. This is why you are getting that error (sgx_urts.lib is not an actual static library, it's a stub library&amp;nbsp;used to link against sgx_urts.dll)&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 15:15:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123896#M1627</guid>
      <dc:creator>Francisco_C_Intel</dc:creator>
      <dc:date>2016-07-15T15:15:04Z</dc:date>
    </item>
    <item>
      <title>Quote:FRANCISCO C. (Intel)</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123897#M1628</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;FRANCISCO C. (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;You are linking the untrusted runtime library:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;sgx_urts.lib&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;into your (trusted) enclave. This is why you are getting that error (sgx_urts.lib is not an actual static library, it's a stub library&amp;nbsp;used to link against sgx_urts.dll)&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Thanks. I had to add it to be able to use sgx_intrin.h header (which needs intrin.h file from the standard include folder of VS2013), more specifically, if I didn't add it, I'd get the following error:&lt;/P&gt;

&lt;P&gt;Error&amp;nbsp;&amp;nbsp; &amp;nbsp;1&amp;nbsp;&amp;nbsp; &amp;nbsp;error LNK2019: unresolved external symbol _sgx_oc_cpuidex referenced in function _sgx_cpuidex.&amp;nbsp;&amp;nbsp; &amp;nbsp;C:\works\trash\Enclave1\Enclave1\sgx_tstdc.lib(se_cpuid.obj)&amp;nbsp;&amp;nbsp; &amp;nbsp;Enclave1&lt;/P&gt;

&lt;P&gt;Is there any other way to resolve this issue? Thanks.&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
	Rad&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 15:30:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123897#M1628</guid>
      <dc:creator>Rad_A_</dc:creator>
      <dc:date>2016-07-15T15:30:09Z</dc:date>
    </item>
    <item>
      <title>There is no trusted version</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123898#M1629</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;There is no trusted version for this fuction (&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;sgx_oc_cpuidex&lt;/SPAN&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;). Thus this function has to be called outside of enclave (OCALL) and I need to add it to the untrusted section of the main EDL file.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Is my understanding correct?&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
	Rad&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 15:41:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123898#M1629</guid>
      <dc:creator>Rad_A_</dc:creator>
      <dc:date>2016-07-15T15:41:51Z</dc:date>
    </item>
    <item>
      <title>You can take a look at the</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123899#M1630</link>
      <description>&lt;P&gt;You can take a look at the SampleEnclave to see how to import/call/link that function.&lt;/P&gt;

&lt;P&gt;C:\Program Files (x86)\Intel\IntelSGXSDK\src\SampleEnclave\Enclave\TrustedLibrary\Libc.edl&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 18:48:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Intel-SGX-with-Intrinsics/m-p/1123899#M1630</guid>
      <dc:creator>Francisco_C_Intel</dc:creator>
      <dc:date>2016-07-15T18:48:09Z</dc:date>
    </item>
  </channel>
</rss>

