Sharing Data Between Loader & Kernel
Posted: Mon Aug 17, 2009 10:44 am
Hi guys,
I just wanted to ask is their a way to include C header files into assembly language sources, I use the GNU Assembler (AT&T syntax) to assemble my loader and GCC to compile my kernel. The reason I am asking, is that I've had troubles sharing data between my loader and my kernel (BTW I don't use the multi-boot specification). What I do typically is set up a memory location that the loader can write to, which can be read later by the kernel. As my loader grew in functionality, the amount of information sent and received between my kernel and my loader increased, it has become really cumbersome to manage all these offsets. What I'd like is to do is declare these offsets in a single loader.h file and include it into both my loader (Assembly) and my kernel sources (C Sources).
Cheers
Abdullah
I just wanted to ask is their a way to include C header files into assembly language sources, I use the GNU Assembler (AT&T syntax) to assemble my loader and GCC to compile my kernel. The reason I am asking, is that I've had troubles sharing data between my loader and my kernel (BTW I don't use the multi-boot specification). What I do typically is set up a memory location that the loader can write to, which can be read later by the kernel. As my loader grew in functionality, the amount of information sent and received between my kernel and my loader increased, it has become really cumbersome to manage all these offsets. What I'd like is to do is declare these offsets in a single loader.h file and include it into both my loader (Assembly) and my kernel sources (C Sources).
Cheers
Abdullah