By the way - my segmenting problem has disappeared without delving into compiler internals. I think someone has added the correct segment prefix overrides when generating x86 code, and that has fixed my problem. I'm not going to investigate exactly who fixed what; I'm just happy that it works. Now I can concentrate on writing user code, and fixing the kernel when it breaks. Things are starting to move ahead, and there is light at the end of the tunnel. I have loadable modules that load (using GRUB). I can then parse the elf header, map the various elf segments to virtual memory addresses, and execute them. If I don't use stdlib it works great. My next job is to figure out why I can link with stdlib, but printf doesn't print. I can call puts() and it works just fine (which is a user-space function that calls a kernel-space function) so I know the overall mechanism is ok - I wonder why printf doesn't work. It may have to do with me not porting newlib as I should have.
Monday, June 1, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment