[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;
|
---|
[8a1afd2] | 25 | kernel_load_address = .;
|
---|
[cfdeedc] | 26 | . = . + SIZEOF_HEADERS;
|
---|
[8a1afd2] | 27 |
|
---|
[ffc277e] | 28 | .text : {
|
---|
[ac5d02b] | 29 | ktext_start = .;
|
---|
[c89ae25] | 30 | /* FIXME: for some reason, mixing .text with .text.* produces a crash on malta-be */
|
---|
[ac5d02b] | 31 | *(.text);
|
---|
[c89ae25] | 32 | *(.text.*);
|
---|
[ac5d02b] | 33 | ktext_end = .;
|
---|
[ffc277e] | 34 | }
|
---|
[6677acb] | 35 |
|
---|
| 36 | /* stack unwinding data */
|
---|
| 37 | .eh_frame_hdr : {
|
---|
| 38 | eh_frame_hdr_start = .;
|
---|
| 39 | *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*);
|
---|
| 40 | eh_frame_hdr_end = .;
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | .eh_frame : {
|
---|
| 44 | eh_frame_start = .;
|
---|
| 45 | KEEP(*(.eh_frame .eh_frame.*));
|
---|
| 46 | eh_frame_end = .;
|
---|
| 47 | }
|
---|
| 48 |
|
---|
[ffc277e] | 49 | .data : {
|
---|
[ac5d02b] | 50 | kdata_start = .;
|
---|
[c89ae25] | 51 | *(.data .data.*); /* initialized data */
|
---|
[da13982] | 52 | *(.rodata .rodata.*);
|
---|
[c89ae25] | 53 | *(.sdata .sdata.*);
|
---|
[24241cf] | 54 | *(.reginfo);
|
---|
[c89ae25] | 55 | *(.sbss .sbss.*);
|
---|
| 56 | *(.scommon .scommon.*);
|
---|
| 57 | *(.bss .bss.*); /* uninitialized static variables */
|
---|
[e94f730] | 58 | *(COMMON); /* global variables */
|
---|
[ffc277e] | 59 | }
|
---|
[6677acb] | 60 |
|
---|
[ffc277e] | 61 | _gp = . + 0x8000;
|
---|
| 62 | .lit8 : { *(.lit8) }
|
---|
| 63 | .lit4 : { *(.lit4) }
|
---|
[f1380b7] | 64 |
|
---|
[ffc277e] | 65 | kdata_end = .;
|
---|
[f1380b7] | 66 |
|
---|
[da13982] | 67 | .comment 0 : { *(.comment); }
|
---|
| 68 | .debug_abbrev 0 : { *(.debug_abbrev); }
|
---|
| 69 | .debug_abbrev.dwo 0 : { *( .debug_abbrev.dwo); }
|
---|
| 70 | .debug_addr 0 : { *(.debug_addr); }
|
---|
| 71 | .debug_aranges 0 : { *(.debug_aranges); }
|
---|
| 72 | .debug_cu_index 0 : { *(.debug_cu_index); }
|
---|
| 73 | .debug_frame 0 : { *(.debug_frame); }
|
---|
| 74 | .debug_frame_hdr 0 : { *(.debug_frame_hdr); }
|
---|
| 75 | .debug_info 0 : { *(.debug_info); }
|
---|
| 76 | .debug_info.dwo 0 : { *(.debug_info.dwo); }
|
---|
| 77 | .debug_line 0 : { *(.debug_line); }
|
---|
| 78 | .debug_line.dwo 0 : { *(.debug_line.dwo); }
|
---|
| 79 | .debug_line_str 0 : { *(.debug_line_str); }
|
---|
| 80 | .debug_loc 0 : { *(.debug_loc); }
|
---|
| 81 | .debug_loclists 0 : { *(.debug_loclists); }
|
---|
| 82 | .debug_loclists.dwo 0 : { *(.debug_loclists.dwo); }
|
---|
| 83 | .debug_macinfo 0 : { *(.debug_macinfo); }
|
---|
| 84 | .debug_macro 0 : { *(.debug_macro); }
|
---|
| 85 | .debug_macro.dwo 0 : { *(.debug_macro.dwo); }
|
---|
| 86 | .debug_names 0 : { *(.debug_names); }
|
---|
| 87 | .debug_pubnames 0 : { *(.debug_pubnames); }
|
---|
| 88 | .debug_pubtypes 0 : { *(.debug_pubtypes); }
|
---|
| 89 | .debug_ranges 0 : { *(.debug_ranges); }
|
---|
| 90 | .debug_rnglists 0 : { *(.debug_rnglists); }
|
---|
| 91 | .debug_str 0 : { *(.debug_str); }
|
---|
| 92 | .debug_str.dwo 0 : { *(.debug_str.dwo); }
|
---|
| 93 | .debug_str_offsets 0 : { *(.debug_str_offsets); }
|
---|
| 94 | .debug_str_offsets.dwo 0 : { *(.debug_str_offsets.dwo); }
|
---|
| 95 | .debug_tu_index 0 : { *(.debug_tu_index); }
|
---|
| 96 | .debug_types 0 : { *(.debug_types); }
|
---|
| 97 |
|
---|
[24241cf] | 98 | /DISCARD/ : {
|
---|
[e94f730] | 99 | *(.mdebug*);
|
---|
| 100 | *(.pdr);
|
---|
| 101 | *(.comment);
|
---|
| 102 | *(.note);
|
---|
[24241cf] | 103 | }
|
---|
[f761f1eb] | 104 | }
|
---|