Rev 1162 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1160 | decky | 1 | /** PPC64 linker script |
2 | * |
||
3 | * umapped section: |
||
4 | * kernel text |
||
5 | * kernel data |
||
6 | * mapped section: |
||
7 | * kernel text |
||
8 | * kernel data |
||
9 | * |
||
10 | */ |
||
11 | |||
12 | #define __ASM__ |
||
13 | #include <arch/boot/boot.h> |
||
14 | #include <arch/mm/page.h> |
||
15 | |||
16 | ENTRY(kernel_image_start) |
||
17 | |||
18 | SECTIONS { |
||
19 | .unmapped 0: AT (0) { |
||
20 | unmapped_ktext_start = .; |
||
21 | *(K_UNMAPPED_TEXT_START); |
||
22 | unmapped_ktext_end = .; |
||
23 | |||
24 | unmapped_kdata_start = .; |
||
25 | *(K_UNMAPPED_DATA_START); |
||
26 | unmapped_kdata_start = .; |
||
27 | } |
||
28 | |||
29 | .mapped PA2KA(BOOT_OFFSET): AT (BOOT_OFFSET) { |
||
30 | ktext_start = .; |
||
31 | *(K_TEXT_START); |
||
32 | *(.text); |
||
33 | ktext_end = .; |
||
34 | |||
35 | kdata_start = .; |
||
36 | *(K_DATA_START); |
||
37 | *(.rodata); |
||
38 | *(.rodata.*); |
||
39 | *(.data); /* initialized data */ |
||
40 | *(.sdata); |
||
41 | *(.sdata2); |
||
42 | *(.sbss); |
||
43 | hardcoded_ktext_size = .; |
||
44 | LONG(ktext_end - ktext_start); |
||
45 | hardcoded_kdata_size = .; |
||
46 | LONG(kdata_end - kdata_start); |
||
47 | hardcoded_load_address = .; |
||
48 | LONG(PA2KA(BOOT_OFFSET)); |
||
49 | *(.bss); /* uninitialized static variables */ |
||
50 | *(COMMON); /* global variables */ |
||
51 | |||
52 | symbol_table = .; |
||
53 | *(symtab.*); /* Symbol table, must be LAST symbol!*/ |
||
54 | |||
55 | kdata_end = .; |
||
56 | } |
||
57 | } |