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

Load ELF object files #135

Open
morganthomas opened this issue Apr 2, 2024 · 1 comment · Fixed by #138
Open

Load ELF object files #135

morganthomas opened this issue Apr 2, 2024 · 1 comment · Fixed by #138
Assignees

Comments

@morganthomas
Copy link
Collaborator

morganthomas commented Apr 2, 2024

Modify Valida to detect if the program file is a raw binary file or an ELF executable file. If the input is an ELF executable file, then load the code and data sections into the program ROM chip and the static data chip, respectively. Include in this repo an example ELF executable file for testing purposes, and an automated test of loading and executing that file.

Note: The first 32-bit word of an ELF file is 0x7F454C46 (big endian), whereas the first 32-bit word of a Valida raw binary executable is a Valida opcode. Since 0x7F45 is not a Valida opcode, we can automatically detect whether a file is an ELF file or a raw binary file by looking at the first 32-bit word of the file.

@morganthomas
Copy link
Collaborator Author

Reopening as there are still some things to fix here; need to not load non-code sections into program ROM, and need to load .strtab sections into static data.

@morganthomas morganthomas reopened this Apr 22, 2024
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