- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
In sgx-ra-sample, I want to add additional source. Let's say my ocall is public A(). In the enclave.cpp file I implement the A() function and the function is depend on B() function. B() is implemented in another file called B.c.
According to Makefile.am, I added B.c in the ENCLAVE_SOURCES. But it's showing undefined reference to B. Here is the enclave sources example
Thanks,
Mzaman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello mzaman,
I got it working by editing the Makefile directly.
- Create a header file, B.h, that contains the declaration to your B() function.
- Add #include <B.h> to Enclave.cpp.
- Edit Makefile:
- am_Enclave_OBJECTS = s_client.$(OBJEXT) Enclave_t.$(OBJEXT)...
- Enclave_SOURCES = Enclave_t.c Enclave_t.h s_client.c Enclave.cpp\
- make clean && make
Sincerely,
Jesus G.
Intel Customer Support
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello mzaman,
Please clarify what you are doing. You wrote that public A() is an ocall.
Ocalls are implemented in the untrusted app, not in the enclave, enclave.cpp.
The enclave calls the ocall which is implemented in the untrusted app.
Sincerely,
Jesus G.
Intel Customer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi JesusG,
Thanks for replying. I think I messed up with the terms.
Let's say, I implement a public A() function (written in the trusted part of Enclave.edl) in Enclave.cpp and it's depend on function B(). Function B() is implemented on B.c file. How can I include B.c file in the make file.
Regards,
Mzaman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello mzaman,
I got it working by editing the Makefile directly.
- Create a header file, B.h, that contains the declaration to your B() function.
- Add #include <B.h> to Enclave.cpp.
- Edit Makefile:
- am_Enclave_OBJECTS = s_client.$(OBJEXT) Enclave_t.$(OBJEXT)...
- Enclave_SOURCES = Enclave_t.c Enclave_t.h s_client.c Enclave.cpp\
- make clean && make
Sincerely,
Jesus G.
Intel Customer Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This thread has been marked as answered and Intel will no longer monitor this thread. If you want a response from Intel in a follow-up question, please open a new thread.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This thread has been marked as answered and Intel will no longer monitor this thread. If you want a response from Intel in a follow-up question, please open a new thread.

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