Subversion Repositories HelenOS

Rev

Rev 2014 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2014 Rev 2089
1
/** ia32xen linker script
1
/** ia32xen linker script
2
 */
2
 */
3
 
3
 
4
#define __ASM__
-
 
5
#include <arch/boot/boot.h>
4
#include <arch/hypercall.h>
6
#include <arch/mm/page.h>
5
#include <arch/mm/page.h>
7
 
6
 
8
ENTRY(kernel_image_start)
7
ENTRY(kernel_image_start)
9
 
8
 
10
PHDRS {
9
PHDRS {
11
	image PT_LOAD FLAGS(7);	/* RWE */
10
	image PT_LOAD FLAGS(7);	/* RWE */
12
	note PT_NOTE FLAGS(4);	/* R__ */
11
	note PT_NOTE FLAGS(4);	/* R__ */
13
}
12
}
14
 
13
 
15
SECTIONS {
14
SECTIONS {
16
	.image PA2KA(BOOT_OFFSET): AT (BOOT_OFFSET) {
15
	.image PA2KA(BOOT_OFFSET): AT (BOOT_OFFSET) {
17
		ktext_start = .;
16
		ktext_start = .;
18
		*(K_TEXT_START);
17
		*(K_TEXT_START);
19
		*(.text);
18
		*(.text);
20
		ktext_end = .;
19
		ktext_end = .;
21
		
20
		
22
		kdata_start = .;
21
		kdata_start = .;
23
		*(.data);			/* initialized data */
22
		*(.data);			/* initialized data */
24
		*(.rodata*);			/* string literals */
23
		*(.rodata*);			/* string literals */
25
		*(COMMON);			/* global variables */
24
		*(COMMON);			/* global variables */
26
		hardcoded_load_address = .;
25
		hardcoded_load_address = .;
27
		LONG(PA2KA(0));
26
		LONG(PA2KA(0));
28
		hardcoded_ktext_size = .;
27
		hardcoded_ktext_size = .;
29
		LONG(ktext_end - ktext_start);
28
		LONG(ktext_end - ktext_start);
30
		hardcoded_kdata_size = .;
29
		hardcoded_kdata_size = .;
31
		LONG(kdata_end - kdata_start);
30
		LONG(kdata_end - kdata_start);
32
		symbol_table = .;
31
		symbol_table = .;
33
		*(symtab.*);            	/* Symbol table, must be LAST symbol! */
32
		*(symtab.*);            	/* Symbol table, must be LAST symbol! */
34
		*(.bss);			/* uninitialized static variables */
33
		*(.bss);			/* uninitialized static variables */
35
		kdata_end = .;
34
		kdata_end = .;
36
	} :image
35
	} :image
37
	
36
	
38
	.notes : {
37
	.notes : {
39
		*(.note.Xen);
38
		*(.note.Xen);
40
	} :note
39
	} :note
41
 
40
 
42
	/DISCARD/ : {
41
	/DISCARD/ : {
43
		*(.note.GNU-stack);		
42
		*(.note.GNU-stack);		
44
		*(.comment);
43
		*(.comment);
45
	}
44
	}
46
}
45
}
47
 
46