OUTPUT_FORMAT("elf64-x86-64")
OUTPUT_ARCH("i386:x86-64")
+/* OUTPUT_ARCH(k1om)*/
_start_kernel = X86_64_START_KERNEL_PHYS;
-SECTIONS {
- . = ALIGN(4k);
- .text X86_64_START_KERNEL_PHYS : ALIGN(4k)
- {
- *(.text);
- }
- _end_kernel_text = .;
-
- . = ALIGN(4k);
- .rodata . :
- {
- *(.rodata);
- }
-
- .bss . :
- {
- *(.bss);
- }
-
- _end_kernel = .;
- /***** These sections get discarded *****/
+ENTRY(startup_64)
+SECTIONS
+{
+ /* Be careful parts of head_64.S assume startup_32 is at
+ * address 0.
+ */
+ . = 0 ;
+ .head.text : {
+ _head = . ;
+ *(.head.text)
+ _ehead = . ;
+ }
+ .rodata..compressed : {
+ *(.rodata..compressed)
+ }
+ .text : {
+ _text = .; /* Text */
+ *(.text)
+ *(.text.*)
+ _etext = . ;
+ }
+ .rodata : {
+ _rodata = . ;
+ *(.rodata) /* read-only data */
+ *(.rodata.*)
+ _erodata = . ;
+ }
+ .got : {
+ _got = .;
+ KEEP(*(.got.plt))
+ KEEP(*(.got))
+ _egot = .;
+ }
+ .data : {
+ _data = . ;
+ *(.data)
+ *(.data.*)
+ _edata = . ;
+ }
+ . = ALIGN((1 << (6)));
+ .bss : {
+ _bss = . ;
+ *(.bss)
+ *(.bss.*)
+ *(COMMON)
+ . = ALIGN(8); /* For convenience during zeroing */
+ _ebss = .;
+ }
+ . = ALIGN((1 << 12));
+ .pgtable : {
+ _pgtable = . ;
+ *(.pgtable)
+ _epgtable = . ;
+ }
+ _end_kernel = .;
+
+ /***** These sections get discarded *****/
/DISCARD/ :
{
/* Discard exception handler frames and headers -- we don't use em */
*(.eh_frame);
*(.eh_frame_hdr);
- *(.note.gnu.build-id);
+ *(.note.gnu.build-id);
*(.interp);
/* *(.dynsym); */
/* *(.dynstr); */
/* *(.gnu.hash); */
*(.dynamic);
}
-}
+}
\ No newline at end of file