How can I build a binrary with 64bit mode in the bootloader.
Posted: Wed Jan 16, 2008 12:47 am
Hello
I wrote a bootloader for OS development study. I built C file to binrary format, Link and combine all code to a image. I will change the bootloader to
complete 64bit mode. So How can I built the C code to 64bit instructions.
Do I need use some the gcc compile options?
Following is script code:
OUTPUT_FORMAT("binary")
INPUT(start.o main.o serial.o io.o misc.o pci.o memory.o
string.o cmdinput.o command.o xmodem.o hdisk.o)
SEARCH_DIR(../build/obj)
ENTRY(_start)
SECTIONS
{
. = 0x10000;
.text : { *(.text) }
.rodata : { *(.rodata) }
.data : { *(.data) }
.bss : { *(.bss) }
_mainend = .;
}
Thanks
I wrote a bootloader for OS development study. I built C file to binrary format, Link and combine all code to a image. I will change the bootloader to
complete 64bit mode. So How can I built the C code to 64bit instructions.
Do I need use some the gcc compile options?
Following is script code:
OUTPUT_FORMAT("binary")
INPUT(start.o main.o serial.o io.o misc.o pci.o memory.o
string.o cmdinput.o command.o xmodem.o hdisk.o)
SEARCH_DIR(../build/obj)
ENTRY(_start)
SECTIONS
{
. = 0x10000;
.text : { *(.text) }
.rodata : { *(.rodata) }
.data : { *(.data) }
.bss : { *(.bss) }
_mainend = .;
}
Thanks