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

Advanced ELF parsing #46

Open
2 of 3 tasks
TCCQ opened this issue Apr 3, 2023 · 2 comments
Open
2 of 3 tasks

Advanced ELF parsing #46

TCCQ opened this issue Apr 3, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@TCCQ
Copy link
Collaborator

TCCQ commented Apr 3, 2023

We need to be able to parse at a minimum non-relocatable executable ELF files, and ideally relocatable ones too.

  • Read/parse ELF header into kernel internal struct
  • Generate process page table from internal struct
  • Hook into file system to avoid compile time inclusions (See File System #45)

The main resource is osdev here, and the initial tests without a filesystem can be done by including an ELF compiled seperately as a binary blob during linking. This not scalable at all, and should really only be for debugging and testing to prevent a hard dependency on #45 in the short term.

@TCCQ TCCQ self-assigned this Apr 3, 2023
@TCCQ
Copy link
Collaborator Author

TCCQ commented Apr 10, 2023

The current version works for statically linked ELFs that are placed manually to avoid kernel / zero page collisions. See example src/programs/spin/

@TCCQ TCCQ mentioned this issue Apr 10, 2023
@TCCQ TCCQ added the enhancement New feature or request label Apr 15, 2023
@TCCQ TCCQ changed the title ELF parsing Advanced ELF parsing Apr 16, 2023
@TCCQ
Copy link
Collaborator Author

TCCQ commented Apr 16, 2023

This will now track optional ELF parsing such as relocatable binaries and linking with system libraries (don't count on that happening any time soon).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant