xref: /openbmc/linux/arch/x86/boot/setup.ld (revision 96ae6ea0)
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
22	. = ALIGN(16);
23	.rodata		: { *(.rodata*) }
24
25	.videocards	: {
26		video_cards = .;
27		*(.videocards)
28		video_cards_end = .;
29	}
30
31	. = ALIGN(16);
32	.data		: { *(.data*) }
33
34	.signature	: {
35		setup_sig = .;
36		LONG(0x5a5aaa55)
37	}
38
39
40	. = ALIGN(16);
41	.bss		:
42	{
43		__bss_start = .;
44		*(.bss)
45		__bss_end = .;
46	}
47	. = ALIGN(16);
48	_end = .;
49
50	/DISCARD/ : { *(.note*) }
51
52	. = ASSERT(_end <= 0x8000, "Setup too big!");
53	. = ASSERT(hdr == 0x1f1, "The setup header has the wrong offset!");
54}
55