Grub output
- Code: Select all
Error 13: Invalid or unsupported executable format
You should first change your nasm arguments to
- Code: Select all
nasm -f elf -o
and then replace your linker script with this one as it includes a rodata section that will help to prevent problems like this in the future
- Code: Select all
ENTRY(start)
SECTIONS
{
.text 0x100000 :
{
code = .; _code = .; __code = .;
*(.text)
. = ALIGN(4096);
}
.data :
{
data = .; _data = .; __data = .;
*(.data)
*(.rodata*)
. = ALIGN(4096);
}
.bss :
{
bss = .; _bss = .; __bss = .;
*(.bss)
. = ALIGN(4096);
}
end = .; _end = .; __end = .;
. = ALIGN(4096);
}
