vmlinux.lds.S 1.1 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
#include <asm/cache.h>
8 9
#include <asm/page_types.h>

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

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