Subversion Repositories HelenOS

Rev

Rev 2089 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2089 Rev 3880
Line 1... Line 1...
1
/** IA-32 linker script
1
/** IA-32 linker script
2
 *  
2
 *
3
 * umapped section:
3
 * umapped section:
4
 * 	kernel text
4
 *  kernel text
5
 * 	kernel data
5
 *  kernel data
6
 * mapped section:
6
 * mapped section:
7
 *	kernel text
7
 *  kernel text
8
 *	kernel data 
8
 *  kernel data
9
 */
9
 */
10
 
10
 
11
#include <arch/boot/boot.h>
11
#include <arch/boot/boot.h>
12
#include <arch/mm/page.h>
12
#include <arch/mm/page.h>
13
 
13
 
Line 26... Line 26...
26
		ktext_start = .;
26
		ktext_start = .;
27
		*(.text);
27
		*(.text);
28
		ktext_end = .;
28
		ktext_end = .;
29
		
29
		
30
		kdata_start = .;
30
		kdata_start = .;
31
		*(.data);			/* initialized data */
31
		*(.data);               /* initialized data */
32
		*(.rodata*);			/* string literals */
32
		*(.rodata*);            /* string literals */
33
		*(COMMON);			/* global variables */
33
		*(COMMON);              /* global variables */
34
		hardcoded_load_address = .;
34
		hardcoded_load_address = .;
35
		LONG(PA2KA(BOOT_OFFSET));
35
		LONG(PA2KA(BOOT_OFFSET));
36
		hardcoded_ktext_size = .;
36
		hardcoded_ktext_size = .;
37
		LONG((ktext_end - ktext_start) + (unmapped_ktext_end - unmapped_ktext_start));
37
		LONG((ktext_end - ktext_start) + (unmapped_ktext_end - unmapped_ktext_start));
38
		hardcoded_kdata_size = .;
38
		hardcoded_kdata_size = .;
Line 40... Line 40...
40
		hardcoded_unmapped_ktext_size = .;
40
		hardcoded_unmapped_ktext_size = .;
41
		LONG(unmapped_ktext_end - unmapped_ktext_start);
41
		LONG(unmapped_ktext_end - unmapped_ktext_start);
42
		hardcoded_unmapped_kdata_size = .;
42
		hardcoded_unmapped_kdata_size = .;
43
		LONG(unmapped_kdata_end - unmapped_kdata_start);
43
		LONG(unmapped_kdata_end - unmapped_kdata_start);
44
		symbol_table = .;
44
		symbol_table = .;
45
		*(symtab.*);            	/* Symbol table, must be LAST symbol! */
45
		*(symtab.*);            /* Symbol table, must be LAST symbol! */
46
		*(.bss);			/* uninitialized static variables */
46
		*(.bss);                /* uninitialized static variables */
47
		kdata_end = .;
47
		kdata_end = .;
48
	}
48
	}
49
 
49
	
50
	/DISCARD/ : {
50
	/DISCARD/ : {
51
		*(.note.GNU-stack);		
51
		*(.note.GNU-stack);
52
		*(.comment);
52
		*(.comment);
53
	}
53
	}
54
	
54
	
55
#ifdef CONFIG_SMP	
55
#ifdef CONFIG_SMP
56
	
56
	
57
	_hardcoded_unmapped_size = (unmapped_ktext_end - unmapped_ktext_start) + (unmapped_kdata_end - unmapped_kdata_start);
57
	_hardcoded_unmapped_size = (unmapped_ktext_end - unmapped_ktext_start) + (unmapped_kdata_end - unmapped_kdata_start);
58
	ap_boot = unmapped_ap_boot - BOOT_OFFSET + AP_BOOT_OFFSET;
58
	ap_boot = unmapped_ap_boot - BOOT_OFFSET + AP_BOOT_OFFSET;
59
	ap_gdtr = unmapped_ap_gdtr - BOOT_OFFSET + AP_BOOT_OFFSET;
59
	ap_gdtr = unmapped_ap_gdtr - BOOT_OFFSET + AP_BOOT_OFFSET;
60
	protected_ap_gdtr = PA2KA(ap_gdtr);
60
	protected_ap_gdtr = PA2KA(ap_gdtr);
61
 
61
	
62
#endif /* CONFIG_SMP */
62
#endif /* CONFIG_SMP */
63
 
63
	
64
}
64
}