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

Emulator divergence compared to a Unix-like OS in the argc and argv contents of the main function of a guest binary. #195

Open
btsouts opened this issue Feb 23, 2021 · 0 comments
Assignees

Comments

@btsouts
Copy link
Collaborator

btsouts commented Feb 23, 2021

Is your feature request related to a problem?
In a Unix-like (MacOs, Linux, etc.) OS in the case of command line execution of a binary, the arguments of the main function of the binary are set as follows. Argument argv[0] is the name of the binary and the rest of the argv contents are the command-line arguments of the execution. In the emulator, argv[0] contains the first command line argument and argc is decreased by one compared to the argc of the command line execution in the Unix-like OS. This can lead to inconsistencies within the guest binary source code when it uses the arguments of its main function.

Describe the solution you'd like
We should change the emulator to use the convention that Unix-like operating systems use.

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

No branches or pull requests

2 participants