Subversion Repositories HelenOS

Rev

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

Rev 1880 Rev 2089
1
/** SPARC64 linker script
1
/** SPARC64 linker script
2
 *
2
 *
3
 *  It is ELF format, but its only section looks like this:
3
 *  It is ELF format, but its only section looks like this:
4
 *  kernel text
4
 *  kernel text
5
 *  kernel data
5
 *  kernel data
6
 *
6
 *
7
 */
7
 */
8
 
8
 
9
#define __LINKER__
-
 
10
#include <arch/boot/boot.h>
9
#include <arch/boot/boot.h>
11
 
10
 
12
ENTRY(kernel_image_start)
11
ENTRY(kernel_image_start)
13
 
12
 
14
SECTIONS {
13
SECTIONS {
15
	.image VMA: AT (LMA) { 
14
	.image VMA: AT (LMA) { 
16
		ktext_start = .;
15
		ktext_start = .;
17
		*(K_TEXT_START)
16
		*(K_TEXT_START)
18
		*(.text);
17
		*(.text);
19
		ktext_end = .;
18
		ktext_end = .;
20
		
19
		
21
		kdata_start = .;
20
		kdata_start = .;
22
		*(K_DATA_START)
21
		*(K_DATA_START)
23
		*(.rodata);
22
		*(.rodata);
24
		*(.rodata.*);
23
		*(.rodata.*);
25
		*(.data);		/* initialized data */
24
		*(.data);		/* initialized data */
26
		*(.sdata);
25
		*(.sdata);
27
		*(.sdata2);
26
		*(.sdata2);
28
		*(.sbss);
27
		*(.sbss);
29
		. = ALIGN(8);
28
		. = ALIGN(8);
30
		hardcoded_ktext_size = .;
29
		hardcoded_ktext_size = .;
31
		QUAD(ktext_end - ktext_start);	
30
		QUAD(ktext_end - ktext_start);	
32
		hardcoded_kdata_size = .;
31
		hardcoded_kdata_size = .;
33
		QUAD(kdata_end - kdata_start);
32
		QUAD(kdata_end - kdata_start);
34
		hardcoded_load_address = .;
33
		hardcoded_load_address = .;
35
		QUAD(VMA);
34
		QUAD(VMA);
36
		*(.bss);		/* uninitialized static variables */	
35
		*(.bss);		/* uninitialized static variables */	
37
		*(COMMON); 		/* global variables */
36
		*(COMMON); 		/* global variables */
38
 
37
 
39
		symbol_table = .;
38
		symbol_table = .;
40
                *(symtab.*);            /* Symbol table, must be LAST symbol!*/
39
                *(symtab.*);            /* Symbol table, must be LAST symbol!*/
41
 
40
 
42
		kdata_end = .;
41
		kdata_end = .;
43
	}
42
	}
44
	
43
	
45
	/DISCARD/ : {
44
	/DISCARD/ : {
46
		*(*);
45
		*(*);
47
	}
46
	}
48
 
47
 
49
}
48
}
50
 
49