| Linus Torvalds | 51b26ad | 2009-04-26 10:12:47 -0700 | [diff] [blame] | 1 | OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT) |
| 2 | |||||
| Sam Ravnborg | 83c4832 | 2009-04-30 12:03:16 +0200 | [diff] [blame] | 3 | #undef i386 |
| 4 | |||||
| H. Peter Anvin | 5b11f1c | 2009-05-08 16:20:34 -0700 | [diff] [blame] | 5 | #include <asm/page_types.h> |
| 6 | |||||
| Linus Torvalds | 51b26ad | 2009-04-26 10:12:47 -0700 | [diff] [blame] | 7 | #ifdef CONFIG_X86_64 |
| Vivek Goyal | 1ab60e0 | 2007-05-02 19:27:07 +0200 | [diff] [blame] | 8 | OUTPUT_ARCH(i386:x86-64) |
| 9 | ENTRY(startup_64) | ||||
| Linus Torvalds | 51b26ad | 2009-04-26 10:12:47 -0700 | [diff] [blame] | 10 | #else |
| 11 | OUTPUT_ARCH(i386) | ||||
| 12 | ENTRY(startup_32) | ||||
| 13 | #endif | ||||
| 14 | |||||
| Vivek Goyal | 1ab60e0 | 2007-05-02 19:27:07 +0200 | [diff] [blame] | 15 | SECTIONS |
| 16 | { | ||||
| Yinghai Lu | 32ed937 | 2008-02-01 17:49:41 +0100 | [diff] [blame] | 17 | /* Be careful parts of head_64.S assume startup_32 is at |
| Ian Campbell | afe0bc6 | 2008-01-30 13:33:37 +0100 | [diff] [blame] | 18 | * address 0. |
| Vivek Goyal | 1ab60e0 | 2007-05-02 19:27:07 +0200 | [diff] [blame] | 19 | */ |
| 20 | . = 0; | ||||
| Ian Campbell | 20514e9 | 2008-01-30 13:33:38 +0100 | [diff] [blame] | 21 | .text.head : { |
| Vivek Goyal | 1ab60e0 | 2007-05-02 19:27:07 +0200 | [diff] [blame] | 22 | _head = . ; |
| 23 | *(.text.head) | ||||
| 24 | _ehead = . ; | ||||
| Ian Campbell | 20514e9 | 2008-01-30 13:33:38 +0100 | [diff] [blame] | 25 | } |
| 26 | .rodata.compressed : { | ||||
| 27 | *(.rodata.compressed) | ||||
| 28 | } | ||||
| 29 | .text : { | ||||
| Vivek Goyal | 1ab60e0 | 2007-05-02 19:27:07 +0200 | [diff] [blame] | 30 | _text = .; /* Text */ |
| 31 | *(.text) | ||||
| 32 | *(.text.*) | ||||
| 33 | _etext = . ; | ||||
| 34 | } | ||||
| 35 | .rodata : { | ||||
| 36 | _rodata = . ; | ||||
| 37 | *(.rodata) /* read-only data */ | ||||
| 38 | *(.rodata.*) | ||||
| 39 | _erodata = . ; | ||||
| 40 | } | ||||
| 41 | .data : { | ||||
| 42 | _data = . ; | ||||
| 43 | *(.data) | ||||
| 44 | *(.data.*) | ||||
| 45 | _edata = . ; | ||||
| 46 | } | ||||
| H. Peter Anvin | 0b4eb46 | 2009-04-30 17:59:36 -0700 | [diff] [blame] | 47 | . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); |
| Vivek Goyal | 1ab60e0 | 2007-05-02 19:27:07 +0200 | [diff] [blame] | 48 | .bss : { |
| 49 | _bss = . ; | ||||
| 50 | *(.bss) | ||||
| 51 | *(.bss.*) | ||||
| 52 | *(COMMON) | ||||
| H. Peter Anvin | 5b11f1c | 2009-05-08 16:20:34 -0700 | [diff] [blame] | 53 | . = ALIGN(8); /* For convenience during zeroing */ |
| Yinghai Lu | 4a9f54c | 2008-04-10 15:06:38 -0700 | [diff] [blame] | 54 | _ebss = .; |
| Vivek Goyal | 1ab60e0 | 2007-05-02 19:27:07 +0200 | [diff] [blame] | 55 | } |
| H. Peter Anvin | 5b11f1c | 2009-05-08 16:20:34 -0700 | [diff] [blame] | 56 | #ifdef CONFIG_X86_64 |
| 57 | . = ALIGN(PAGE_SIZE); | ||||
| 58 | .pgtable : { | ||||
| 59 | _pgtable = . ; | ||||
| 60 | *(.pgtable) | ||||
| 61 | _epgtable = . ; | ||||
| 62 | } | ||||
| 63 | #endif | ||||
| 64 | _end = .; | ||||
| Vivek Goyal | 1ab60e0 | 2007-05-02 19:27:07 +0200 | [diff] [blame] | 65 | } |