Subversion Repositories HelenOS

Rev

Rev 217 | Rev 243 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
65 decky 1
/** IA-32 linker script
1 jermar 2
 *  
105 jermar 3
 * umapped section:
4
 * 	kernel text
5
 * 	kernel data
6
 * mapped section:
7
 *	kernel text
8
 *	kernel data 
1 jermar 9
 */
10
 
11
OUTPUT_FORMAT(binary)
12
ENTRY(kernel_image_start)
13
 
14
SECTIONS {
106 jermar 15
	.unmapped 0x8000: AT (0x8000) {
16
		unmapped_ktext_start = .;
17
		*(K_TEXT_START);
110 jermar 18
		*(K_TEXT_START_2);
106 jermar 19
		unmapped_ktext_end = .;
20
		unmapped_kdata_start = .;
21
		*(K_DATA_START);
22
		unmapped_kdata_end = .;
23
	}
1 jermar 24
 
235 decky 25
	.mapped (0x80100000+SIZEOF(.unmapped)+0x8000) : AT (0x8000+SIZEOF(.unmapped)) { 
106 jermar 26
		ktext_start = .;
27
		*(.text);
28
		ktext_end = .;
1 jermar 29
 
106 jermar 30
		kdata_start = .;
31
		*(.data);		/* initialized data */
32
		*(.rodata*);		/* string literals */
33
		*(COMMON);		/* global variables */
216 palkovsky 34
		hardcoded_load_address = .;
235 decky 35
		LONG(0x80108000);
216 palkovsky 36
		hardcoded_ktext_size = .;
37
		LONG(ktext_end - ktext_start + (unmapped_ktext_end - unmapped_ktext_start));
38
		hardcoded_kdata_size = .;
39
		LONG(kdata_end - kdata_start + (unmapped_kdata_end - unmapped_kdata_start));
106 jermar 40
		*(.bss);		/* uninitialized static variables */
41
		*(K_DATA_END);
42
		kdata_end = .;
43
	}
235 decky 44
 
45
	_hardcoded_kernel_size = (ktext_end - ktext_start) + (unmapped_ktext_end - unmapped_ktext_start) + (kdata_end - kdata_start) + (unmapped_kdata_end - unmapped_kdata_start);
46
 
1 jermar 47
}