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