Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Postal
Beginner
137 Views

About ECALL method name used at SampleCode/LocalAttestation

Jump to solution

Hello.

Today I was reading the codes in "SampleCode/LocalAttestation/" of Linux version, and I found some strange points.

In "SampleCode/LocalAttestation/App/App.cpp, it calls "Enclave1_test_create_session()" for creating session between Enclave1 and another enclave, but I cannot find the definition of that method anywhere. Only I can find with its definition is "test_create_session()" method in enclave code, instead of "Enclave1_test_create_session". Of course the functions for Enclave2 and Enclave3, and other-purpose functions (e.g. Enclave2_test_enclave_to_enclave_call() ) are also the same.

Is there any feature on SGX that automatically resolve function names following the directory name or something?

Maybe there is massive possibility that I missed something which should be known, so please forgive me for my poor question (and my poor English).

0 Kudos
1 Solution
Scott_R_Intel
Employee
137 Views

Hello.

The Enclave1_test_create_session is automatically created at build time by the sgx_edger8r utility, which takes .edl files as inputs and creates the edge routines to call in and out of enclaves.  So, if you run make from the project root, the header/source file for all the functions defined in the .edl files will be created, adding the name of the .edl file to the beginning of the function, "Enclave1_" in this case.  You can read more about the edger8r tool in the SGX Dev Ref for Linux.

Regards.

Scott

View solution in original post

2 Replies
Scott_R_Intel
Employee
138 Views

Hello.

The Enclave1_test_create_session is automatically created at build time by the sgx_edger8r utility, which takes .edl files as inputs and creates the edge routines to call in and out of enclaves.  So, if you run make from the project root, the header/source file for all the functions defined in the .edl files will be created, adding the name of the .edl file to the beginning of the function, "Enclave1_" in this case.  You can read more about the edger8r tool in the SGX Dev Ref for Linux.

Regards.

Scott

View solution in original post

Postal
Beginner
137 Views

Thanks for replying! I'll look into them.

Regards,

Postal

Reply