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

Refactoring the translation of execve() and fixing the handling of shebang #47

Merged
merged 4 commits into from
Jul 30, 2021

Conversation

imlk0
Copy link
Collaborator

@imlk0 imlk0 commented Jul 29, 2021

This PR contains two main parts:

  • Refactoring the translation of execve()

    • The old execve() translation function does not implement recursive parsing of the interpreter, which means that the interpreter of a script file can not be a script file, resulting in a limitation. This PR fixed that problem.
    • The previous process of loading executable files is less extensible. For this reason, I split the load function into load_elf() and load_script().
  • Fixing the handling of shebang

This commit rewrites the translation of the execve() system call to makes it easier to extend. For
shebang, optional-argument is now supported, and recursive parsing is also
@imlk0 imlk0 added this to the v0.0.1 milestone Jul 29, 2021
@imlk0 imlk0 requested a review from oxr463 July 29, 2021 09:38
@imlk0 imlk0 self-assigned this Jul 29, 2021
tests/execve/test.bats Outdated Show resolved Hide resolved
@oxr463 oxr463 merged commit 1b368af into master Jul 30, 2021
@oxr463 oxr463 deleted the fix-shebang branch July 30, 2021 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants