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

Add support for an executable format #28

Open
xadaemon opened this issue Jan 4, 2021 · 5 comments
Open

Add support for an executable format #28

xadaemon opened this issue Jan 4, 2021 · 5 comments

Comments

@xadaemon
Copy link
Contributor

xadaemon commented Jan 4, 2021

I'm opening this to look into discussing this and see if:

  • it makes sense right now as the project stands?
  • if it does choose between ELF or PE;

the main objective with having an executable format is to make adding applications easier, I'd say we go with elf since that's what the tool-chain is putting out.

@29jm
Copy link
Owner

29jm commented Jan 4, 2021

It'd make a lot of sense! I tried writing an elf (elf it is) parser at some point, but found an easier workaround for what I wanted to do at the time, so I ended up dumping it, barely started. Having an elf loader would fix a few hacks:

  • the kernel can only load programs whose entry point is at address 0x1000
  • executable files must include the entirety of their data, even .bss sections (see the comment in modules/mod.ld)

and it'd allow for cool things later on (dynamic linking?). Not sure how it would all fit together, proc_run_code (in proc.c) or even earlier proc_exec could make use of it probably. I'll have more time later this week to investigate. Is it something you'd be interested in working on?

@xadaemon
Copy link
Contributor Author

xadaemon commented Jan 4, 2021 via email

@29jm
Copy link
Owner

29jm commented Jan 4, 2021

Yeah I get that, similar situation for me basically, this week especially. Anyway that'd be a long awaited feature, and don't hesitate to open a draft pr early!

@xadaemon
Copy link
Contributor Author

xadaemon commented Jan 4, 2021

@29jm let's do this assign me and I will prob open the PR pretty early on since I might need a lot more input from you this time around (so we can keep a consistent design).

@29jm
Copy link
Owner

29jm commented Jan 4, 2021

Alright, let's do this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants