Porting newlib without execve
Posted: Thu Nov 19, 2009 4:51 pm
Hi,
I am planning when i am far enough into OS development to port newlib to my OS then from there use that to compile gcc and binutils for my OS. However, i am unsure as to what will happen if i do not implement execve() in newlib, would this break any possibility of running gcc?
It seems gcc is pretty much tied to unix style schemantics, and i do not want to implement execve() in my OS, i am going to be going for a more CreateProcess style function instead. exec however has special behaviour in that it replaces the text portion of the code and leaves the environment, file handles etc intact, and causes the actual caller to be *replaced* (e.g. it never actually returns) where createprocess would return, and spawn a second process much like fork() and exec() combined.
So in short, can i get away with not implementing execve() and still be able to port gcc?
I am planning when i am far enough into OS development to port newlib to my OS then from there use that to compile gcc and binutils for my OS. However, i am unsure as to what will happen if i do not implement execve() in newlib, would this break any possibility of running gcc?
It seems gcc is pretty much tied to unix style schemantics, and i do not want to implement execve() in my OS, i am going to be going for a more CreateProcess style function instead. exec however has special behaviour in that it replaces the text portion of the code and leaves the environment, file handles etc intact, and causes the actual caller to be *replaced* (e.g. it never actually returns) where createprocess would return, and spawn a second process much like fork() and exec() combined.
So in short, can i get away with not implementing execve() and still be able to port gcc?