I'm currently working on the process loader for Acess, and I was wondering how the stack should be initialized for a new process.
At the moment it resides at the end of the .bss segment but is it supposed to be allocated by the kernel to a set size or specified in the executable image?
The executable format I'm using is ELF-32.
Stack for new processes
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Stack for new processes
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Thanks, I was thinking that that was the case, but I wanted to be sure.
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
this is what i'm going to do (when i get round to porting my c library). it seems like the easiest and most effective approachCombuster wrote:I have a piece of assembly in the C runtime which is called first thing at process startup. Amongst others, it asks the kernel for a piece of memory and sets the stack to that.