Subversion Repositories HelenOS

Rev

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

Rev 2787 Rev 4377
Line 1... Line 1...
1
/*
1
/*
2
 *  MIPS32 linker script
2
 * MIPS32 linker script
3
 *  
3
 *
4
 *  kernel text
4
 *  kernel text
5
 *  kernel data
5
 *  kernel data
6
 *  
6
 *
7
 */
7
 */
-
 
8
 
8
#undef mips
9
#undef mips
9
#define mips mips
10
#define mips mips
10
 
11
 
11
OUTPUT_ARCH(mips)
12
#define KERNEL_LOAD_ADDRESS 0x80100000
12
 
13
 
-
 
14
OUTPUT_ARCH(mips)
13
ENTRY(kernel_image_start)
15
ENTRY(kernel_image_start)
14
 
16
 
15
SECTIONS {
17
SECTIONS {
16
	. = KERNEL_LOAD_ADDRESS;
18
	. = KERNEL_LOAD_ADDRESS;
17
	.text : {
19
	.text : {
Line 19... Line 21...
19
		*(.text);
21
		*(.text);
20
		ktext_end = .;
22
		ktext_end = .;
21
	}
23
	}
22
	.data : {
24
	.data : {
23
		kdata_start = .;
25
		kdata_start = .;
24
		*(.data);		/* initialized data */
26
		*(.data);                       /* initialized data */
25
		hardcoded_ktext_size = .;
27
		hardcoded_ktext_size = .;
26
		LONG(ktext_end - ktext_start);	
28
		LONG(ktext_end - ktext_start);
27
		hardcoded_kdata_size = .;
29
		hardcoded_kdata_size = .;
28
		LONG(kdata_end - kdata_start);
30
		LONG(kdata_end - kdata_start);
29
		hardcoded_load_address = .;
31
		hardcoded_load_address = .;
30
		LONG(KERNEL_LOAD_ADDRESS);
32
		LONG(KERNEL_LOAD_ADDRESS);
31
		*(.rodata*);
33
		*(.rodata*);
32
		*(.sdata);
34
		*(.sdata);
33
		*(.reginfo);
35
		*(.reginfo);
34
		*(.sbss);
36
		*(.sbss);
35
		*(.scommon);
37
		*(.scommon);
36
		*(.bss);		/* uninitialized static variables */
38
		*(.bss);                        /* uninitialized static variables */
37
		*(COMMON); 		/* global variables */
39
		*(COMMON);                      /* global variables */
38
		symbol_table = .;
40
		symbol_table = .;
39
		*(symtab.*);             
41
		*(symtab.*);
40
	}
42
	}
41
	_gp = . + 0x8000;
43
	_gp = . + 0x8000;
42
	.lit8 : { *(.lit8) }
44
	.lit8 : { *(.lit8) }
43
	.lit4 : { *(.lit4) }
45
	.lit4 : { *(.lit4) }
44
 
46
	
45
	kdata_end = .;
47
	kdata_end = .;
46
 
48
	
47
	/DISCARD/ : {
49
	/DISCARD/ : {
48
	  *(.mdebug*);
50
		*(.mdebug*);
49
	  *(.pdr);
51
		*(.pdr);
50
	  *(.comment);
52
		*(.comment);
51
	  *(.note);
53
		*(.note);
52
	}
54
	}
53
}
55
}