Code: Select all
ENTRY(start)
SECTIONS
{
. = 0x100000;
.text :
{
code = .; _code = .; __code = .;
*(.text)
. = ALIGN(4096);
}
.data :
{
data = .; _data = .; __data = .;
*(.data)
*(.rodata)
. = ALIGN(4096);
}
.bss :
{
bss = .; _bss = .; __bss = .;
*(.bss)
. = ALIGN(4096);
}
end = .; _end = .; __end = .;
}
Code: Select all
code: 0x1badboo2
data: 0x00105ca0
bss: 0x00000000
end: 0x3a434347
I am using grub-mkrescue to make an ISO file which I am running with QEMU, so maybe that is causing some trouble. My ld command is:
ld -T link.ld -m elf_i386 -o kernel/kernel.elf boot/grubboot.o ${OBJC} ${OBJA}
Any thoughts?