vmlinux.lds.S 1.0 KB
Newer Older
1 2
#include <asm-generic/vmlinux.lds.h>

3 4
OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT)

5 6
#undef i386

7 8
#include <asm/page_types.h>

9
#ifdef CONFIG_X86_64
10 11
OUTPUT_ARCH(i386:x86-64)
ENTRY(startup_64)
12 13 14 15 16
#else
OUTPUT_ARCH(i386)
ENTRY(startup_32)
#endif

17 18
SECTIONS
{
Y
Yinghai Lu 已提交
19
	/* Be careful parts of head_64.S assume startup_32 is at
20
	 * address 0.
21 22
	 */
	. = 0;
23
	.head.text : {
24
		_head = . ;
25
		HEAD_TEXT
26
		_ehead = . ;
27 28 29 30 31
	}
	.rodata.compressed : {
		*(.rodata.compressed)
	}
	.text :	{
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
		_text = .; 	/* Text */
		*(.text)
		*(.text.*)
		_etext = . ;
	}
	.rodata : {
		_rodata = . ;
		*(.rodata)	 /* read-only data */
		*(.rodata.*)
		_erodata = . ;
	}
	.data :	{
		_data = . ;
		*(.data)
		*(.data.*)
		_edata = . ;
	}
49
	. = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
50 51 52 53 54
	.bss : {
		_bss = . ;
		*(.bss)
		*(.bss.*)
		*(COMMON)
55
		. = ALIGN(8);	/* For convenience during zeroing */
56
		_ebss = .;
57
	}
58 59 60 61 62 63 64 65 66
#ifdef CONFIG_X86_64
       . = ALIGN(PAGE_SIZE);
       .pgtable : {
		_pgtable = . ;
		*(.pgtable)
		_epgtable = . ;
	}
#endif
	_end = .;
67
}