Executing code from VFS

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
User avatar
LegendDairy
Member
Member
Posts: 52
Joined: Sat Nov 06, 2010 10:42 am
Location: Antwerp (Belgium)

Executing code from VFS

Post by LegendDairy »

Hi,
I just set up a VFS en initrd using GRUB and I also set up syscalls and I even setup multitasking. Now I was wondering would it be hard to place a "*.bin" in my VFS and execute it?
And where in the *.bin-files does the actual code starts?
Tosi
Member
Member
Posts: 255
Joined: Tue Jun 15, 2010 9:27 am
Location: Flyover State, United States
Contact:

Re: Executing code from VFS

Post by Tosi »

It starts wherever you want it to. You have control over paging, so you have control over where your programs run. If you're not using paging (bad), just find a good spot in physical memory to put it.
If you want a simple executable, write some PIC and assemble it as a flat binary file. Then put that in your initramd and run it anywhere.
Post Reply