Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Clean mechanism for specifying entry point for native eapps #30

Open
dkohlbre opened this issue Jul 3, 2019 · 3 comments
Open

Clean mechanism for specifying entry point for native eapps #30

dkohlbre opened this issue Jul 3, 2019 · 3 comments

Comments

@dkohlbre
Copy link
Collaborator

dkohlbre commented Jul 3, 2019

Currently if you make a native eapp (don't link to libc) without an lds/etc the linker will just choose the first function in the file as the entry point (doesn't see a _start).

We need a simple standard way to specify the entry point at compilation time of the eapp. We don't want to have to coordinate with the host app.

@dkohlbre
Copy link
Collaborator Author

dkohlbre commented Jul 3, 2019

Best solution to this is probably:
Have the eapp library contain the entry point, have it always call main(). Same as libc would do.

We may need to de-conflict this with using libc in enclaves as well.

@Nisiyama-Suzune
Copy link

Alternatively we may change int main to void _start in native eapps.
We may also set a linker flag -e main to direct the entry point to main.

@dkohlbre
Copy link
Collaborator Author

void _start wrapped into an ENCLAVE_START macro or similar is almost certainly the right answer.
Lets us make it slightly smarter later on, and keeps it working for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants