Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Egalito transformed "hello-world" binary cannot work properly #43

Open
lzyxdu opened this issue Dec 7, 2024 · 1 comment
Open

Egalito transformed "hello-world" binary cannot work properly #43

lzyxdu opened this issue Dec 7, 2024 · 1 comment

Comments

@lzyxdu
Copy link

lzyxdu commented Dec 7, 2024

I've transformed a "hello-world" binary using Egalito.
The transforamtion indeed complete successfully. However, when I executed the command provided in the README, i.e.:

./etelf -m ../src/ex/hello hello && ./hello # this results in a segfault

It results in a segmentation fault...

I then used gdb to single step into the transformed hello binary, and found that the direct function call to puts@plt (within main) had not been correctly transformed, which causes the seg fault.

I'm using Ubuntu 20.04 and the matser branch of Egalito (I also tested the ubuntu-20.04 and the ssss branch but the transformed binary segfaults in both cases). However, when I tested the egalito-artefact (I download it from this website), the transformed hello binary works as expected.

Is this a bug, or could it be caused by my environment? Any suggestions or insights would be greatly appreciated.

Thanks in advance!

ps: I attached a transformed hello binary in the .zip format hello.zip (generated by egalito's ssss branch)

@lzyxdu
Copy link
Author

lzyxdu commented Dec 7, 2024

Update:
I tested the old hello binary found in the egalito-artefact, and it can be transformed properly using the current master branch of Egalito.

Therefore, it seems that Egalito can only transform specific binaries. To make it work with newer binaries will likely require additional engineering efforts.

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

No branches or pull requests

1 participant