Intel® Software Guard Extensions (Intel® SGX)
Discussion board focused on hardware-based isolation and memory encryption to provide extended code protection in solutions.

[check_symbol_table elfparser.cpp:228] symbol 'memset' is undefined The input enclave file is not correct.

dai_c_
Beginner
1,172 Views

When  I use SGX SDK to sign enclave.so,an error happened:

 

<EnclaveConfiguration>
    <ProdID>0</ProdID>
    <ISVSVN>0</ISVSVN>
    <StackMaxSize>0x40000</StackMaxSize>
    <HeapMaxSize>0x100000</HeapMaxSize>
    <TCSNum>10</TCSNum>
    <TCSPolicy>1</TCSPolicy>
    <!-- Recommend changing 'DisableDebug' to 1 to make the enclave undebuggable for enclave release -->
    <DisableDebug>0</DisableDebug>
    <MiscSelect>0</MiscSelect>
    <MiscMask>0xFFFFFFFF</MiscMask>
</EnclaveConfiguration>
[check_symbol_table elfparser.cpp:228] symbol 'memset' is undefined
The input enclave file is not correct.
Error happened while signing the enclave.

 

it shows symbol 'memset' is undefined,Did I miss something when compile the enclave?

 

0 Kudos
1 Solution
you_w_
New Contributor III
1,172 Views

Hi:

To find out the reason, you may need to share your make file. Maybe you linked the wrong dynamic library, check your enclave link option carefully .

Regards

you

View solution in original post

0 Kudos
3 Replies
you_w_
New Contributor III
1,173 Views

Hi:

To find out the reason, you may need to share your make file. Maybe you linked the wrong dynamic library, check your enclave link option carefully .

Regards

you

0 Kudos
dai_c_
Beginner
1,172 Views

Yes,You are right,The reason is I am not link some static libraries,so it can't generate the right .so file,and the sign tool can't sign it,now I link the libraries,it works!

0 Kudos
Star__Star
Beginner
1,172 Views

you w. wrote:

Hi:

To find out the reason, you may need to share your make file. Maybe you linked the wrong dynamic library, check your enclave link option carefully .

Regards

you

Hi,

I need to use the glib-2.0 library in a program. So, I've tried to link the required library. However, I got an error that the functions used in my code (which are defined in glib-2.0 library) are not defined. Something like the following error.

LINK => nnenc.so

[check_symbol_table elfparser.cpp:231] symbol 'g_byte_array_set_size' is undefined

My makefile looks like the following (plus the SGX flags, because I just put the extra flags here):

Nnenc_Link_Flags := -lgmp \ -lpbc \ -lbswabe \ -lcrypto -lgmp\ -L/usr/local/lib -lpbc\ -Wl,-Bdynamic -L /usr/lib/x86_64-linux-gnu -lglib-2.0

It is worth mentioning that I have tried the following options as well and I got the same error.

Nnenc_Link_Flags := -lgmp \ -lpbc \ -lbswabe \ -lcrypto -lgmp\ -L/usr/local/lib -lpbc\ -L/usr/lib/x86_64-linux-gnu -lglib-2.0

I do not know what is wrong with my linker because I included the required headers and libraries.

Would you please let me know how can I solve this problem.

LINK => nnenc.so

[check_symbol_table elfparser.cpp:231] symbol 'g_byte_array_set_size' is undefined

0 Kudos
Reply