summaryrefslogtreecommitdiff
path: root/rt/hare.sc
blob: 0cb9c029066992a46e1506c5d8831f0e21f90963 (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
OUTPUT_FORMAT(elf64-x86-64)
ENTRY(_stage0)

PHDRS {
        headers PT_PHDR PHDRS;
        text PT_LOAD FILEHDR PHDRS;
        data PT_LOAD;
}

SECTIONS {
	. = 0x0;

        . = 0x500;
	. = ALIGN(4096);
	_p4 = .;
	. += 4096;
	_p3 = .;
	. += 4096;
	_p2 = .;
	. += 4096;
	_p1 = .;
	. += 4096;

	. = 0x7c00;
        stack_top = .;

	boot_start = .;

	boot : {
		boot_stage0_start = .;
		*(boot.stage0)
		boot_stage0_end = .;

		boot_stage1_start = .;
		*(boot.stage1)
		boot_stage1_end = .;

                . = ALIGN(512);
	}

	.text : {
	      KEEP (*(.text))
	      *(.text.*)
	} :text
	.data : {
	      KEEP (*(.data))
	      *(.data.*)
	      . = ALIGN(16);
	      KEEP (*(.exception_array))
	} :data
	.init_array : {
	      PROVIDE_HIDDEN (__init_array_start = .);
	      KEEP (*(.init_array))
	      PROVIDE_HIDDEN (__init_array_end = .);	    
	} :data
	.fini_array : {
	      PROVIDE_HIDDEN (__fini_array_start = .);
	      KEEP (*(.fini_array))
	      PROVIDE_HIDDEN (__fini_array_end = .);
	} :data
	.test_array : {
	      PROVIDE_HIDDEN (__test_array_start = .);
	      KEEP (*(.test_array))
	      PROVIDE_HIDDEN (__test_array_end = .);	    
        } :data
	
	.bss : {
	      KEEP (*(.bss))
	      *(.bss.*)
	} :data


	boot_end = .;
}