kernel entry address
Posted: Sun Sep 02, 2007 12:38 pm
how does my bootloader find the entry address of my c kernel?
i link with
but the mapfile says this
so the main function is placed at 0x00100090 which is pretty useless
and it moves from time to time when the code changes
how do i make sure the main function stays at 0x00100000?
here it is:
i link with
Code: Select all
LDFLAGS = -nostdlib -e _main -Ttext 0x100000 -L$(LIB_PATH) -Map kernel.map
Code: Select all
Address of section .text set to 0x100000
LOAD kernel32.o
LOAD main.o
LOAD ..\..\lib\/libos.a
LOAD ..\..\lib\/libc.a
.text 0x00100000 0x670
*(.text)
.text 0x00100000 0x90 kernel32.o
0x00100034 kernel32
.text 0x00100090 0x20 main.o
0x00100090 main
and it moves from time to time when the code changes
how do i make sure the main function stays at 0x00100000?
here it is:
Code: Select all
void kernel32();
int main()
{
kernel32();
while(1);
}