xref: /openbmc/linux/arch/x86/boot/setup.ld (revision 09c205af)
196ae6ea0SThomas Gleixner/*
296ae6ea0SThomas Gleixner * setup.ld
396ae6ea0SThomas Gleixner *
496ae6ea0SThomas Gleixner * Linker script for the i386 setup code
596ae6ea0SThomas Gleixner */
696ae6ea0SThomas GleixnerOUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
796ae6ea0SThomas GleixnerOUTPUT_ARCH(i386)
896ae6ea0SThomas GleixnerENTRY(_start)
996ae6ea0SThomas Gleixner
1096ae6ea0SThomas GleixnerSECTIONS
1196ae6ea0SThomas Gleixner{
1296ae6ea0SThomas Gleixner	. = 0;
1396ae6ea0SThomas Gleixner	.bstext		: { *(.bstext) }
1496ae6ea0SThomas Gleixner	.bsdata		: { *(.bsdata) }
1596ae6ea0SThomas Gleixner
1609c205afSH. Peter Anvin	. = 495;
1796ae6ea0SThomas Gleixner	.header		: { *(.header) }
187a734e7dSH. Peter Anvin	.entrytext	: { *(.entrytext) }
1996ae6ea0SThomas Gleixner	.inittext	: { *(.inittext) }
2096ae6ea0SThomas Gleixner	.initdata	: { *(.initdata) }
217a734e7dSH. Peter Anvin	__end_init = .;
227a734e7dSH. Peter Anvin
23be721696SH. Peter Anvin	.text		: { *(.text) }
24be721696SH. Peter Anvin	.text32		: { *(.text32) }
2596ae6ea0SThomas Gleixner
2696ae6ea0SThomas Gleixner	. = ALIGN(16);
2796ae6ea0SThomas Gleixner	.rodata		: { *(.rodata*) }
2896ae6ea0SThomas Gleixner
2996ae6ea0SThomas Gleixner	.videocards	: {
3096ae6ea0SThomas Gleixner		video_cards = .;
3196ae6ea0SThomas Gleixner		*(.videocards)
3296ae6ea0SThomas Gleixner		video_cards_end = .;
3396ae6ea0SThomas Gleixner	}
3496ae6ea0SThomas Gleixner
3596ae6ea0SThomas Gleixner	. = ALIGN(16);
3696ae6ea0SThomas Gleixner	.data		: { *(.data*) }
3796ae6ea0SThomas Gleixner
3896ae6ea0SThomas Gleixner	.signature	: {
3996ae6ea0SThomas Gleixner		setup_sig = .;
4096ae6ea0SThomas Gleixner		LONG(0x5a5aaa55)
4196ae6ea0SThomas Gleixner	}
4296ae6ea0SThomas Gleixner
4396ae6ea0SThomas Gleixner
4496ae6ea0SThomas Gleixner	. = ALIGN(16);
4596ae6ea0SThomas Gleixner	.bss		:
4696ae6ea0SThomas Gleixner	{
4796ae6ea0SThomas Gleixner		__bss_start = .;
4896ae6ea0SThomas Gleixner		*(.bss)
4996ae6ea0SThomas Gleixner		__bss_end = .;
5096ae6ea0SThomas Gleixner	}
5196ae6ea0SThomas Gleixner	. = ALIGN(16);
5296ae6ea0SThomas Gleixner	_end = .;
5396ae6ea0SThomas Gleixner
5496ae6ea0SThomas Gleixner	/DISCARD/ : { *(.note*) }
5596ae6ea0SThomas Gleixner
56a5912f6bSIngo Molnar	/*
57a5912f6bSIngo Molnar	 * The ASSERT() sink to . is intentional, for binutils 2.14 compatibility:
58a5912f6bSIngo Molnar	 */
5996ae6ea0SThomas Gleixner	. = ASSERT(_end <= 0x8000, "Setup too big!");
6096ae6ea0SThomas Gleixner	. = ASSERT(hdr == 0x1f1, "The setup header has the wrong offset!");
617a734e7dSH. Peter Anvin	/* Necessary for the very-old-loader check to work... */
627a734e7dSH. Peter Anvin	. = ASSERT(__end_init <= 5*512, "init sections too big!");
637a734e7dSH. Peter Anvin
6496ae6ea0SThomas Gleixner}
65