source:
mainline/kernel/arch/mips32/_link.ld.in@
0c91cff
| Last change on this file since 0c91cff was 14febed9, checked in by , 13 years ago | |
|---|---|
|
|
| File size: 1.1 KB | |
| Rev | Line | |
|---|---|---|
| [f761f1eb] | 1 | /* |
| [e94f730] | 2 | * MIPS32 linker script |
| 3 | * | |
| [f761f1eb] | 4 | * kernel text |
| 5 | * kernel data | |
| [e94f730] | 6 | * |
| [f761f1eb] | 7 | */ |
| [e94f730] | 8 | |
| [ffc277e] | 9 | #undef mips |
| 10 | #define mips mips | |
| [f761f1eb] | 11 | |
| [14febed9] | 12 | #if defined(MACHINE_msim) |
| [7f341820] | 13 | #define KERNEL_LOAD_ADDRESS 0x80100000 |
| [14febed9] | 14 | #endif |
| 15 | ||
| 16 | #if defined(MACHINE_lmalta) || defined(MACHINE_bmalta) | |
| 17 | #define KERNEL_LOAD_ADDRESS 0x80200000 | |
| 18 | #endif | |
| [7f341820] | 19 | |
| [ffc277e] | 20 | OUTPUT_ARCH(mips) |
| [04d4512] | 21 | ENTRY(kernel_image_start) |
| [f761f1eb] | 22 | |
| 23 | SECTIONS { | |
| [24241cf] | 24 | . = KERNEL_LOAD_ADDRESS; |
| [ffc277e] | 25 | .text : { |
| [ac5d02b] | 26 | ktext_start = .; |
| 27 | *(.text); | |
| 28 | ktext_end = .; | |
| [ffc277e] | 29 | } |
| 30 | .data : { | |
| [ac5d02b] | 31 | kdata_start = .; |
| [e94f730] | 32 | *(.data); /* initialized data */ |
| [c832cc0a] | 33 | hardcoded_ktext_size = .; |
| [e94f730] | 34 | LONG(ktext_end - ktext_start); |
| [c832cc0a] | 35 | hardcoded_kdata_size = .; |
| 36 | LONG(kdata_end - kdata_start); | |
| 37 | hardcoded_load_address = .; | |
| [24241cf] | 38 | LONG(KERNEL_LOAD_ADDRESS); |
| 39 | *(.rodata*); | |
| 40 | *(.sdata); | |
| 41 | *(.reginfo); | |
| [04d4512] | 42 | *(.sbss); |
| 43 | *(.scommon); | |
| [e94f730] | 44 | *(.bss); /* uninitialized static variables */ |
| 45 | *(COMMON); /* global variables */ | |
| [1ac3a52] | 46 | . = ALIGN(8); |
| [3156582] | 47 | symbol_table = .; |
| [e94f730] | 48 | *(symtab.*); |
| [ffc277e] | 49 | } |
| 50 | _gp = . + 0x8000; | |
| 51 | .lit8 : { *(.lit8) } | |
| 52 | .lit4 : { *(.lit4) } | |
| [e94f730] | 53 | |
| [ffc277e] | 54 | kdata_end = .; |
| [e94f730] | 55 | |
| [24241cf] | 56 | /DISCARD/ : { |
| [e94f730] | 57 | *(.mdebug*); |
| 58 | *(.pdr); | |
| 59 | *(.comment); | |
| 60 | *(.note); | |
| [24241cf] | 61 | } |
| [f761f1eb] | 62 | } |
Note:
See TracBrowser
for help on using the repository browser.
