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

Executable loading #349

Merged
merged 6 commits into from
Jun 9, 2022
Merged

Executable loading #349

merged 6 commits into from
Jun 9, 2022

Conversation

vinc
Copy link
Owner

@vinc vinc commented Jun 8, 2022

Trying to spawn a regular file would generate an exception so this PR add a header to binary file to detect them during the syscall and return an error in case the detection failed that will be used by the shell.

Just like ELF files that start with 7F 45 4C 46 (the last bytes coding for ELF in ASCII), the flat binary used by MOROS at the moment will now start with 7F 42 49 4E (the last bytes for BIN).

@vinc
Copy link
Owner Author

vinc commented Jun 8, 2022

This last commit actually fixed ELF loading! But the PR is introducing a new bug because /bin/hello can't be run more than once without cause a general protection fault.

@vinc vinc marked this pull request as ready for review June 9, 2022 20:59
@vinc vinc merged commit cd2e016 into trunk Jun 9, 2022
@vinc vinc deleted the feature/executable-loading branch June 9, 2022 20:59
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

Successfully merging this pull request may close these issues.

1 participant