blob: a6f1a59a5b0cc491e772eb04d2d1570d9e32bf85 [file] [log] [blame]
Tim Abbott1dc818c2009-09-16 16:44:27 -04001#include <asm-generic/vmlinux.lds.h>
2
Linus Torvalds51b26ad2009-04-26 10:12:47 -07003OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT)
4
Sam Ravnborg83c48322009-04-30 12:03:16 +02005#undef i386
6
Jan Beulich350f8f52009-11-13 11:54:40 +00007#include <asm/cache.h>
H. Peter Anvin5b11f1c2009-05-08 16:20:34 -07008#include <asm/page_types.h>
9
Linus Torvalds51b26ad2009-04-26 10:12:47 -070010#ifdef CONFIG_X86_64
Vivek Goyal1ab60e02007-05-02 19:27:07 +020011OUTPUT_ARCH(i386:x86-64)
12ENTRY(startup_64)
Linus Torvalds51b26ad2009-04-26 10:12:47 -070013#else
14OUTPUT_ARCH(i386)
15ENTRY(startup_32)
16#endif
17
Vivek Goyal1ab60e02007-05-02 19:27:07 +020018SECTIONS
19{
Yinghai Lu32ed9372008-02-01 17:49:41 +010020 /* Be careful parts of head_64.S assume startup_32 is at
Ian Campbellafe0bc62008-01-30 13:33:37 +010021 * address 0.
Vivek Goyal1ab60e02007-05-02 19:27:07 +020022 */
23 . = 0;
Tim Abbott1dc818c2009-09-16 16:44:27 -040024 .head.text : {
Vivek Goyal1ab60e02007-05-02 19:27:07 +020025 _head = . ;
Tim Abbott1dc818c2009-09-16 16:44:27 -040026 HEAD_TEXT
Vivek Goyal1ab60e02007-05-02 19:27:07 +020027 _ehead = . ;
Ian Campbell20514e92008-01-30 13:33:38 +010028 }
29 .rodata.compressed : {
30 *(.rodata.compressed)
31 }
32 .text : {
Vivek Goyal1ab60e02007-05-02 19:27:07 +020033 _text = .; /* Text */
34 *(.text)
35 *(.text.*)
36 _etext = . ;
37 }
38 .rodata : {
39 _rodata = . ;
40 *(.rodata) /* read-only data */
41 *(.rodata.*)
42 _erodata = . ;
43 }
44 .data : {
45 _data = . ;
46 *(.data)
47 *(.data.*)
48 _edata = . ;
49 }
Jan Beulich350f8f52009-11-13 11:54:40 +000050 . = ALIGN(L1_CACHE_BYTES);
Vivek Goyal1ab60e02007-05-02 19:27:07 +020051 .bss : {
52 _bss = . ;
53 *(.bss)
54 *(.bss.*)
55 *(COMMON)
H. Peter Anvin5b11f1c2009-05-08 16:20:34 -070056 . = ALIGN(8); /* For convenience during zeroing */
Yinghai Lu4a9f54c2008-04-10 15:06:38 -070057 _ebss = .;
Vivek Goyal1ab60e02007-05-02 19:27:07 +020058 }
H. Peter Anvin5b11f1c2009-05-08 16:20:34 -070059#ifdef CONFIG_X86_64
60 . = ALIGN(PAGE_SIZE);
61 .pgtable : {
62 _pgtable = . ;
63 *(.pgtable)
64 _epgtable = . ;
65 }
66#endif
67 _end = .;
Vivek Goyal1ab60e02007-05-02 19:27:07 +020068}