summaryrefslogtreecommitdiffstats
path: root/arch/x86/realmode/rm/realmode.lds.S
blob: 4d4afcaf5f029fb41df3cec1225583d254af2648 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
 * realmode.lds.S
 *
 * Linker script for the real-mode code
 */

#include <asm/page_types.h>

#undef i386

OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)

SECTIONS
{
	real_mode_seg = 0;

	. = 0;
	.header : {
		pa_real_mode_base = .;
		*(.header)
	}

	. = ALIGN(4);
	.rodata : {
		*(.rodata)
		*(.rodata.*)
		. = ALIGN(16);
		video_cards = .;
		*(.videocards)
		video_cards_end = .;
	}

	. = ALIGN(PAGE_SIZE);
	pa_text_start = .;
	.text : {
		*(.text)
		*(.text.*)
	}

	.text32 : {
		*(.text32)
		*(.text32.*)
	}

	.text64 : {
		*(.text64)
		*(.text64.*)
	}
	pa_ro_end = .;

	. = ALIGN(PAGE_SIZE);
	.data : {
		*(.data)
		*(.data.*)
	}

	. = ALIGN(128);
	.bss : {
		*(.bss*)
	}

	/* End signature for integrity checking */
	. = ALIGN(4);
	.signature : {
		*(.signature)
	}
	pa_end = .;

	/DISCARD/ : {
		*(.note*)
		*(.debug*)
		*(.eh_frame*)
	}

#include "pasyms.h"
}