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