Rev 329 | Rev 341 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 329 | Rev 332 | ||
---|---|---|---|
1 | /* |
1 | /* |
2 | * MIPS linker script |
2 | * MIPS linker script |
3 | * |
3 | * |
4 | * kernel text |
4 | * kernel text |
5 | * kernel data |
5 | * kernel data |
6 | * |
6 | * |
7 | */ |
7 | */ |
8 | #undef mips |
8 | #undef mips |
9 | #define mips mips |
9 | #define mips mips |
10 | 10 | ||
11 | OUTPUT_FORMAT(BFD) |
11 | OUTPUT_FORMAT(BFD) |
12 | 12 | ||
13 | OUTPUT_ARCH(mips) |
13 | OUTPUT_ARCH(mips) |
14 | 14 | ||
15 | ENTRY(kernel_image_start) |
15 | ENTRY(kernel_image_start) |
16 | 16 | ||
17 | SECTIONS { |
17 | SECTIONS { |
18 | . = KERNEL_LOAD_ADDRESS; |
18 | . = KERNEL_LOAD_ADDRESS; |
19 | .text : { |
19 | .text : { |
20 | ktext_start = .; |
20 | ktext_start = .; |
21 | *(.text); |
21 | *(.text); |
22 | ktext_end = .; |
22 | ktext_end = .; |
23 | } |
23 | } |
24 | .data : { |
24 | .data : { |
25 | kdata_start = .; |
25 | kdata_start = .; |
26 | *(.data); /* initialized data */ |
26 | *(.data); /* initialized data */ |
27 | hardcoded_ktext_size = .; |
27 | hardcoded_ktext_size = .; |
28 | LONG(ktext_end - ktext_start); |
28 | LONG(ktext_end - ktext_start); |
29 | hardcoded_kdata_size = .; |
29 | hardcoded_kdata_size = .; |
30 | LONG(kdata_end - kdata_start); |
30 | LONG(kdata_end - kdata_start); |
31 | hardcoded_load_address = .; |
31 | hardcoded_load_address = .; |
32 | LONG(KERNEL_LOAD_ADDRESS); |
32 | LONG(KERNEL_LOAD_ADDRESS); |
33 | *(.rodata*); |
33 | *(.rodata*); |
34 | *(.sdata); |
34 | *(.sdata); |
35 | *(.reginfo); |
35 | *(.reginfo); |
- | 36 | /* Unfortunately IRIX does not allow us |
|
- | 37 | * to include this as a last section :-( |
|
- | 38 | * BSS/SBSS addresses will be wrong */ |
|
- | 39 | symbol_table = .; |
|
- | 40 | *(symtab.*); |
|
36 | } |
41 | } |
37 | _gp = . + 0x8000; |
42 | _gp = . + 0x8000; |
38 | .lit8 : { *(.lit8) } |
43 | .lit8 : { *(.lit8) } |
39 | .lit4 : { *(.lit4) } |
44 | .lit4 : { *(.lit4) } |
40 | .sbss : { |
45 | .sbss : { |
41 | *(.sbss); |
46 | *(.sbss); |
42 | *(.scommon); |
47 | *(.scommon); |
43 | } |
48 | } |
44 | .bss : { |
49 | .bss : { |
45 | *(.bss); /* uninitialized static variables */ |
50 | *(.bss); /* uninitialized static variables */ |
46 | *(COMMON); /* global variables */ |
51 | *(COMMON); /* global variables */ |
47 | } |
52 | } |
48 | 53 | ||
49 | mysymtab : { |
- | |
50 | symbol_table = .; |
- | |
51 | *(symtab.*); /* Symbol table, must be LAST symbol!*/ |
- | |
52 | } |
- | |
53 | kdata_end = .; |
54 | kdata_end = .; |
54 | 55 | ||
55 | /DISCARD/ : { |
56 | /DISCARD/ : { |
56 | *(.mdebug*); |
57 | *(.mdebug*); |
57 | *(.pdr); |
58 | *(.pdr); |
58 | *(.comment); |
59 | *(.comment); |
59 | *(.note); |
60 | *(.note); |
60 | } |
61 | } |
61 | } |
62 | } |
62 | 63 |