[6bc4dbd] | 1 | /** PPC32 linker script
|
---|
[c723d7a1] | 2 | *
|
---|
[edc89bd0] | 3 | * umapped section:
|
---|
[34259b9] | 4 | * kernel text
|
---|
| 5 | * kernel data
|
---|
[edc89bd0] | 6 | * mapped section:
|
---|
[34259b9] | 7 | * kernel text
|
---|
| 8 | * kernel data
|
---|
[c723d7a1] | 9 | *
|
---|
[f761f1eb] | 10 | */
|
---|
| 11 |
|
---|
[45d6add] | 12 | #include <arch/boot/boot.h>
|
---|
| 13 | #include <arch/mm/page.h>
|
---|
[6bc4dbd] | 14 |
|
---|
[f761f1eb] | 15 | ENTRY(kernel_image_start)
|
---|
[33472fa] | 16 | OUTPUT_FORMAT("elf32-powerpc")
|
---|
[9055bd1] | 17 | OUTPUT_ARCH("powerpc:common")
|
---|
[f761f1eb] | 18 |
|
---|
| 19 | SECTIONS {
|
---|
[8a1afd2] | 20 | kernel_load_address = PA2KA(0);
|
---|
| 21 |
|
---|
[cfdeedc] | 22 | .unmapped (SIZEOF_HEADERS): AT (SIZEOF_HEADERS) {
|
---|
| 23 | . = ALIGN(0x100);
|
---|
[c89ae25] | 24 | KEEP(*(K_UNMAPPED_TEXT_START));
|
---|
[edc89bd0] | 25 | }
|
---|
[f1380b7] | 26 |
|
---|
[6677acb] | 27 | .text PA2KA(BOOT_OFFSET): AT (BOOT_OFFSET) {
|
---|
[76cec1e] | 28 | ktext_start = .;
|
---|
[c89ae25] | 29 | KEEP(*(K_TEXT_START));
|
---|
| 30 | *(.text .text.*);
|
---|
[c723d7a1] | 31 | ktext_end = .;
|
---|
[6677acb] | 32 | }
|
---|
| 33 |
|
---|
| 34 | /* stack unwinding data */
|
---|
| 35 | .eh_frame_hdr : {
|
---|
| 36 | eh_frame_hdr_start = .;
|
---|
| 37 | *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*);
|
---|
| 38 | eh_frame_hdr_end = .;
|
---|
| 39 | }
|
---|
| 40 |
|
---|
| 41 | .eh_frame : {
|
---|
| 42 | eh_frame_start = .;
|
---|
| 43 | KEEP(*(.eh_frame .eh_frame.*));
|
---|
| 44 | eh_frame_end = .;
|
---|
| 45 | }
|
---|
[f1380b7] | 46 |
|
---|
[6677acb] | 47 | .data : {
|
---|
[c723d7a1] | 48 | kdata_start = .;
|
---|
[c89ae25] | 49 | KEEP(*(K_DATA_START));
|
---|
[5bddc53] | 50 | *(.rodata .rodata.*);
|
---|
[c89ae25] | 51 | *(.data .data.*); /* initialized data */
|
---|
| 52 | *(.sdata .sdata.*);
|
---|
| 53 | *(.sdata2 .sdata2.*);
|
---|
| 54 | *(.sbss .sbss.*);
|
---|
| 55 | *(.bss .bss.*); /* uninitialized static variables */
|
---|
[34259b9] | 56 | *(COMMON); /* global variables */
|
---|
[76cec1e] | 57 | kdata_end = .;
|
---|
| 58 | }
|
---|
[cfdeedc] | 59 |
|
---|
[da13982] | 60 | .comment 0 : { *(.comment); }
|
---|
| 61 | .debug_abbrev 0 : { *(.debug_abbrev); }
|
---|
| 62 | .debug_abbrev.dwo 0 : { *( .debug_abbrev.dwo); }
|
---|
| 63 | .debug_addr 0 : { *(.debug_addr); }
|
---|
| 64 | .debug_aranges 0 : { *(.debug_aranges); }
|
---|
| 65 | .debug_cu_index 0 : { *(.debug_cu_index); }
|
---|
| 66 | .debug_frame 0 : { *(.debug_frame); }
|
---|
| 67 | .debug_frame_hdr 0 : { *(.debug_frame_hdr); }
|
---|
| 68 | .debug_info 0 : { *(.debug_info); }
|
---|
| 69 | .debug_info.dwo 0 : { *(.debug_info.dwo); }
|
---|
| 70 | .debug_line 0 : { *(.debug_line); }
|
---|
| 71 | .debug_line.dwo 0 : { *(.debug_line.dwo); }
|
---|
| 72 | .debug_line_str 0 : { *(.debug_line_str); }
|
---|
| 73 | .debug_loc 0 : { *(.debug_loc); }
|
---|
| 74 | .debug_loclists 0 : { *(.debug_loclists); }
|
---|
| 75 | .debug_loclists.dwo 0 : { *(.debug_loclists.dwo); }
|
---|
| 76 | .debug_macinfo 0 : { *(.debug_macinfo); }
|
---|
| 77 | .debug_macro 0 : { *(.debug_macro); }
|
---|
| 78 | .debug_macro.dwo 0 : { *(.debug_macro.dwo); }
|
---|
| 79 | .debug_names 0 : { *(.debug_names); }
|
---|
| 80 | .debug_pubnames 0 : { *(.debug_pubnames); }
|
---|
| 81 | .debug_pubtypes 0 : { *(.debug_pubtypes); }
|
---|
| 82 | .debug_ranges 0 : { *(.debug_ranges); }
|
---|
| 83 | .debug_rnglists 0 : { *(.debug_rnglists); }
|
---|
| 84 | .debug_str 0 : { *(.debug_str); }
|
---|
| 85 | .debug_str.dwo 0 : { *(.debug_str.dwo); }
|
---|
| 86 | .debug_str_offsets 0 : { *(.debug_str_offsets); }
|
---|
| 87 | .debug_str_offsets.dwo 0 : { *(.debug_str_offsets.dwo); }
|
---|
| 88 | .debug_tu_index 0 : { *(.debug_tu_index); }
|
---|
| 89 | .debug_types 0 : { *(.debug_types); }
|
---|
| 90 |
|
---|
[cfdeedc] | 91 | /DISCARD/ : {
|
---|
| 92 | *(*);
|
---|
| 93 | }
|
---|
[f761f1eb] | 94 | }
|
---|