Community
cancel
Showing results for 
Search instead for 
Did you mean: 
dai_c_
Beginner
177 Views

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

Jump to solution

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

Accepted Solutions
you_w_
New Contributor III
177 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

3 Replies
you_w_
New Contributor III
178 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

dai_c_
Beginner
177 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!

Star__Star
Beginner
177 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