xref: /openbmc/linux/arch/x86/boot/setup.ld (revision b04b4f78)
1/*
2 * setup.ld
3 *
4 * Linker script for the i386 setup code
5 */
6OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
7OUTPUT_ARCH(i386)
8ENTRY(_start)
9
10SECTIONS
11{
12	. = 0;
13	.bstext		: { *(.bstext) }
14	.bsdata		: { *(.bsdata) }
15
16	. = 497;
17	.header		: { *(.header) }
18	.inittext	: { *(.inittext) }
19	.initdata	: { *(.initdata) }
20	.text		: { *(.text) }
21	.text32		: { *(.text32) }
22
23	. = ALIGN(16);
24	.rodata		: { *(.rodata*) }
25
26	.videocards	: {
27		video_cards = .;
28		*(.videocards)
29		video_cards_end = .;
30	}
31
32	. = ALIGN(16);
33	.data		: { *(.data*) }
34
35	.signature	: {
36		setup_sig = .;
37		LONG(0x5a5aaa55)
38	}
39
40
41	. = ALIGN(16);
42	.bss		:
43	{
44		__bss_start = .;
45		*(.bss)
46		__bss_end = .;
47	}
48	. = ALIGN(16);
49	_end = .;
50
51	/DISCARD/ : { *(.note*) }
52
53	. = ASSERT(_end <= 0x8000, "Setup too big!");
54	. = ASSERT(hdr == 0x1f1, "The setup header has the wrong offset!");
55}
56