- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it possible to create an SGX application that references a static library, compiled as position-dependent code?
I have attempted to port a test application to an SGX application using a 3rd party porting tool, and have found I'm only able to do this successfully when all of the involved libraries are compiled using the -fPIC tag.
For one of the libraries I would like my enclave functions to reference, I only have access to the .a files, so recompiling the library as PIC is not an option. Looking through SGX documentation, I have been unable to narrow down if this is a limitation of SGX, or if its perhaps just the manner in which I'm trying to port the application.
I found this thread, where someone appears to have the same issue as me with a different library, but the link to the solution is broken: https://community.intel.com/t5/Intel-Software-Guard-Extensions/Build-enclave-using-libgmp/m-p/1151640
Any guidance?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Porting a library means recompiling it from source where the -fPIC flag is mandatory. But since you only have access to .a files, your best option would be to use Gramine (https://github.com/gramineproject/gramine) to wrap the whole application in an enclave. This is not necessarily the same as porting a library, but it could work for your use case.
Sincerely,
Sahira R.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Here is an example of how the GMP library was ported to SGX: https://github.com/intel/sgx-gmp to be used in an enclave
Sincerely,
Sahira
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Porting a library means recompiling it from source where the -fPIC flag is mandatory. But since you only have access to .a files, your best option would be to use Gramine (https://github.com/gramineproject/gramine) to wrap the whole application in an enclave. This is not necessarily the same as porting a library, but it could work for your use case.
Sincerely,
Sahira R.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page