bunch of work in progress on getting x86_64 bootstrap working.
[newos.git] / boot / x86_64 / stage1.ld
blob6f6f8c4a5e78b92f2caa0f17ce29442a9a0ba101
1 OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
2 OUTPUT_ARCH(i386:x86-64)
4 ENTRY(_start)
5 SECTIONS
7         . = 0x100000;
9         /* text/read-only data */
10         .text : { *(.text .gnu.linkonce.t.*) }
12         __ctor_list = .;
13         .ctors : { *(.ctors) }
14         __ctor_end = .;
16         .rodata : { *(.rodata .rodata.*) }
18         /* writable data  */
19         . = ALIGN(0x1000);
20         __data_start = .;
21         .data : { *(.data .gnu.linkonce.d.* .bss) }
23         /* . = ALIGN(0x1000); */
24         _end = . ;
26         /* Strip unnecessary stuff */
27         /DISCARD/ : { *(.comment .note .eh_frame .dtors .stab .stabstr .debug*) }