开发者

Executable Initialization

开发者 https://www.devze.com 2023-01-07 18:46 出处:网络
When is it de开发者_如何学编程cided where the stack, global, and frame pointers are in memory?I\'m trying to load an ELF executable into a simulator and I can\'t figure out what instructions load the

When is it de开发者_如何学编程cided where the stack, global, and frame pointers are in memory? I'm trying to load an ELF executable into a simulator and I can't figure out what instructions load the global, stack and frame pointers into the regfile.


It depends on the architecture, but generally the kernel sets up the initial stack and frame pointers before any user-space instructions execute, and the global pointer (if any) is established by the dynamic linker. The "initial process state" section of your architecture's ABI supplement will explain a lot of this stuff, but for the rest you will probably need to read the source code for your dynamic linker.

If your simulator is user-space only it has to do the kernel's job.

0

精彩评论

暂无评论...
验证码 换一张
取 消