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