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

Same name functions in two different edl files

anton_k_3
Beginner
506 Views

Hello,

I need to use in my application two enclaves and both of them have trusted ecalls with the same names. E.g.:

//Enclave1/enclave1.edl:
enclave { trusted { public void foo(); }; }

//Enclave2/enclave2.edl:
enclave { trusted { public void foo(); }; }

Foos are two different functions with the same name and parameters. Resulting enclave header and object files have the same declaration and body:

//App/Enclave1_u.h:
sgx_status_t foo(sgx_enclave_id_t eid);

//App/Enclave2_u.h:
sgx_status_t foo(sgx_enclave_id_t eid);

I didn't find any namespace mentioning or renaming options. What could I do in this situation?

Thank you

0 Kudos
1 Reply
Rodolfo_S_
New Contributor III
506 Views

Hi Anton,

In the Developer Reference documentation (both Windows and Linux) you can find the information you need in the section called Avoiding Name Collisions.

Cheers,

Rodolfo Marinho

0 Kudos
Reply