xref: /openbmc/linux/arch/x86/boot/setup.ld (revision be721696)
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
1696ae6ea0SThomas Gleixner	. = 497;
1796ae6ea0SThomas Gleixner	.header		: { *(.header) }
1896ae6ea0SThomas Gleixner	.inittext	: { *(.inittext) }
1996ae6ea0SThomas Gleixner	.initdata	: { *(.initdata) }
20be721696SH. Peter Anvin	.text		: { *(.text) }
21be721696SH. Peter Anvin	.text32		: { *(.text32) }
2296ae6ea0SThomas Gleixner
2396ae6ea0SThomas Gleixner	. = ALIGN(16);
2496ae6ea0SThomas Gleixner	.rodata		: { *(.rodata*) }
2596ae6ea0SThomas Gleixner
2696ae6ea0SThomas Gleixner	.videocards	: {
2796ae6ea0SThomas Gleixner		video_cards = .;
2896ae6ea0SThomas Gleixner		*(.videocards)
2996ae6ea0SThomas Gleixner		video_cards_end = .;
3096ae6ea0SThomas Gleixner	}
3196ae6ea0SThomas Gleixner
3296ae6ea0SThomas Gleixner	. = ALIGN(16);
3396ae6ea0SThomas Gleixner	.data		: { *(.data*) }
3496ae6ea0SThomas Gleixner
3596ae6ea0SThomas Gleixner	.signature	: {
3696ae6ea0SThomas Gleixner		setup_sig = .;
3796ae6ea0SThomas Gleixner		LONG(0x5a5aaa55)
3896ae6ea0SThomas Gleixner	}
3996ae6ea0SThomas Gleixner
4096ae6ea0SThomas Gleixner
4196ae6ea0SThomas Gleixner	. = ALIGN(16);
4296ae6ea0SThomas Gleixner	.bss		:
4396ae6ea0SThomas Gleixner	{
4496ae6ea0SThomas Gleixner		__bss_start = .;
4596ae6ea0SThomas Gleixner		*(.bss)
4696ae6ea0SThomas Gleixner		__bss_end = .;
4796ae6ea0SThomas Gleixner	}
4896ae6ea0SThomas Gleixner	. = ALIGN(16);
4996ae6ea0SThomas Gleixner	_end = .;
5096ae6ea0SThomas Gleixner
5196ae6ea0SThomas Gleixner	/DISCARD/ : { *(.note*) }
5296ae6ea0SThomas Gleixner
5396ae6ea0SThomas Gleixner	. = ASSERT(_end <= 0x8000, "Setup too big!");
5496ae6ea0SThomas Gleixner	. = ASSERT(hdr == 0x1f1, "The setup header has the wrong offset!");
5596ae6ea0SThomas Gleixner}
56