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

create_config.py needs improving for PSX #315

Closed
mkst opened this issue Dec 15, 2023 · 0 comments · Fixed by #316
Closed

create_config.py needs improving for PSX #315

mkst opened this issue Dec 15, 2023 · 0 comments · Fixed by #316

Comments

@mkst
Copy link
Collaborator

mkst commented Dec 15, 2023

Per title. The create_config.py script does not work well for PSX binaries:

  • The initial_pc value from the header is the entrypoint for the binary, but the entrypoint is not the first function within the binary
  • The value of gp given in the header is nonsense, if used the $gp register's value is set in the entrypoint function
  • the data* and bss* values in the header also appear to be nonsense.

I have a PR incoming that addresses these in a best-efforts manner. We will scan through the binary until we find a threshold number of valid MIPS I instructions (and we will call this the start of the text segment), and continue until we reach the first invalid instruction (we will call this the end of the text segment and the beginning of the data segment).

This can perhaps be improved upon in due course, but is much better than the current version of create_config.py.

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 a pull request may close this issue.

1 participant