Because no standard library can be used inside Intel SGX enclave. How to implement dynamic loading inside an Enclave? For example, I have functions foo1()
and foo2()
in a file with .so extension type.
I need to dynamically load a function inside the Enclave. Then, main function outside Enclave can call the function loaded.
App.cpp
status = ecall_dynamicLoading(enclave_id,func);
// func is a function pointer loaded from .so
// for example, func = &foo1;
Enclave.cpp
ecall_dynamicLoading(func){
(*func)(/* some inputs */);
}
Is it possible?
Thank you.