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 | |||||
3 | #ifdef CONFIG_X86_64 | ||||
Vivek Goyal | 1ab60e0 | 2007-05-02 19:27:07 +0200 | [diff] [blame] | 4 | OUTPUT_ARCH(i386:x86-64) |
5 | ENTRY(startup_64) | ||||
Linus Torvalds | 51b26ad | 2009-04-26 10:12:47 -0700 | [diff] [blame^] | 6 | #else |
7 | OUTPUT_ARCH(i386) | ||||
8 | ENTRY(startup_32) | ||||
9 | #endif | ||||
10 | |||||
Vivek Goyal | 1ab60e0 | 2007-05-02 19:27:07 +0200 | [diff] [blame] | 11 | SECTIONS |
12 | { | ||||
Yinghai Lu | 32ed937 | 2008-02-01 17:49:41 +0100 | [diff] [blame] | 13 | /* Be careful parts of head_64.S assume startup_32 is at |
Ian Campbell | afe0bc6 | 2008-01-30 13:33:37 +0100 | [diff] [blame] | 14 | * address 0. |
Vivek Goyal | 1ab60e0 | 2007-05-02 19:27:07 +0200 | [diff] [blame] | 15 | */ |
16 | . = 0; | ||||
Ian Campbell | 20514e9 | 2008-01-30 13:33:38 +0100 | [diff] [blame] | 17 | .text.head : { |
Vivek Goyal | 1ab60e0 | 2007-05-02 19:27:07 +0200 | [diff] [blame] | 18 | _head = . ; |
19 | *(.text.head) | ||||
20 | _ehead = . ; | ||||
Ian Campbell | 20514e9 | 2008-01-30 13:33:38 +0100 | [diff] [blame] | 21 | } |
22 | .rodata.compressed : { | ||||
23 | *(.rodata.compressed) | ||||
24 | } | ||||
25 | .text : { | ||||
Vivek Goyal | 1ab60e0 | 2007-05-02 19:27:07 +0200 | [diff] [blame] | 26 | _text = .; /* Text */ |
27 | *(.text) | ||||
28 | *(.text.*) | ||||
29 | _etext = . ; | ||||
30 | } | ||||
31 | .rodata : { | ||||
32 | _rodata = . ; | ||||
33 | *(.rodata) /* read-only data */ | ||||
34 | *(.rodata.*) | ||||
35 | _erodata = . ; | ||||
36 | } | ||||
37 | .data : { | ||||
38 | _data = . ; | ||||
39 | *(.data) | ||||
40 | *(.data.*) | ||||
41 | _edata = . ; | ||||
42 | } | ||||
43 | .bss : { | ||||
44 | _bss = . ; | ||||
45 | *(.bss) | ||||
46 | *(.bss.*) | ||||
47 | *(COMMON) | ||||
Linus Torvalds | 51b26ad | 2009-04-26 10:12:47 -0700 | [diff] [blame^] | 48 | #ifdef CONFIG_X86_64 |
Vivek Goyal | 1ab60e0 | 2007-05-02 19:27:07 +0200 | [diff] [blame] | 49 | . = ALIGN(8); |
Yinghai Lu | 4a9f54c | 2008-04-10 15:06:38 -0700 | [diff] [blame] | 50 | _end_before_pgt = . ; |
Vivek Goyal | 1ab60e0 | 2007-05-02 19:27:07 +0200 | [diff] [blame] | 51 | . = ALIGN(4096); |
52 | pgtable = . ; | ||||
53 | . = . + 4096 * 6; | ||||
Linus Torvalds | 51b26ad | 2009-04-26 10:12:47 -0700 | [diff] [blame^] | 54 | #endif |
Yinghai Lu | 4a9f54c | 2008-04-10 15:06:38 -0700 | [diff] [blame] | 55 | _ebss = .; |
Vivek Goyal | 1ab60e0 | 2007-05-02 19:27:07 +0200 | [diff] [blame] | 56 | } |
57 | } |