source:
mainline/kernel/arch/amd64/_link.ld.in@
8df5f20
Last change on this file since 8df5f20 was 15639ec, checked in by , 7 years ago | |
---|---|
|
|
File size: 1.6 KB |
Rev | Line | |
---|---|---|
[c245372b] | 1 | /** AMD64 linker script |
[2ddcc7b] | 2 | * |
[1141c1a] | 3 | * umapped section: |
[2ddcc7b] | 4 | * kernel text |
5 | * kernel data | |
[1141c1a] | 6 | * mapped section: |
[2ddcc7b] | 7 | * kernel text |
8 | * kernel data | |
[1141c1a] | 9 | */ |
10 | ||
[4f1475d4] | 11 | #include <arch/boot/boot.h> |
12 | #include <arch/mm/page.h> | |
13 | ||
[1141c1a] | 14 | SECTIONS { |
[8a1afd2] | 15 | kernel_load_address = PA2KA(BOOT_OFFSET); |
16 | ||
[15639ec] | 17 | .unmapped (BOOT_OFFSET + SIZEOF_HEADERS): AT (BOOT_OFFSET + SIZEOF_HEADERS) { |
[bae43dc] | 18 | unmapped_start = .; |
[1141c1a] | 19 | *(K_TEXT_START); |
20 | *(K_DATA_START); | |
[19077a5] | 21 | *(K_INI_PTLS); |
[bae43dc] | 22 | unmapped_end = .; |
[1141c1a] | 23 | } |
[f1380b7] | 24 | |
[15639ec] | 25 | .mapped (PA2KA(BOOT_OFFSET) + SIZEOF_HEADERS + SIZEOF(.unmapped)) : AT (BOOT_OFFSET + SIZEOF_HEADERS + SIZEOF(.unmapped)) { |
[1141c1a] | 26 | ktext_start = .; |
[d21e72db] | 27 | *(.text .text.*); |
[1141c1a] | 28 | ktext_end = .; |
[f1380b7] | 29 | |
[1141c1a] | 30 | kdata_start = .; |
[d21e72db] | 31 | *(.data); /* initialized data */ |
32 | *(.rodata .rodata.*); /* string literals */ | |
[2ddcc7b] | 33 | *(COMMON); /* global variables */ |
[f1380b7] | 34 | |
[95d45482] | 35 | /* bss can't be omitted from the ELF image. */ |
[cfdeedc] | 36 | *(.bss); /* uninitialized static variables */ |
37 | ||
[1ac3a52] | 38 | . = ALIGN(8); |
[ab08b42] | 39 | symbol_table = .; |
[2ddcc7b] | 40 | *(symtab.*); /* Symbol table, must be LAST symbol!*/ |
[f1380b7] | 41 | |
[1141c1a] | 42 | kdata_end = .; |
43 | } | |
[f1380b7] | 44 | |
[9ded977] | 45 | #ifdef CONFIG_LINE_DEBUG |
46 | .comment 0 : { *(.comment); } | |
47 | .debug_abbrev 0 : { *(.debug_abbrev); } | |
48 | .debug_aranges 0 : { *(.debug_aranges); } | |
49 | .debug_info 0 : { *(.debug_info); } | |
50 | .debug_line 0 : { *(.debug_line); } | |
51 | .debug_loc 0 : { *(.debug_loc); } | |
52 | .debug_pubnames 0 : { *(.debug_pubnames); } | |
53 | .debug_pubtypes 0 : { *(.debug_pubtypes); } | |
54 | .debug_ranges 0 : { *(.debug_ranges); } | |
55 | .debug_str 0 : { *(.debug_str); } | |
56 | #endif | |
[f1380b7] | 57 | |
[5b8c75a] | 58 | /DISCARD/ : { |
59 | *(*); | |
60 | } | |
[f1380b7] | 61 | |
[2ddcc7b] | 62 | #ifdef CONFIG_SMP |
[42edee68] | 63 | ap_boot = unmapped_ap_boot - BOOT_OFFSET + AP_BOOT_OFFSET; |
64 | ap_gdtr = unmapped_ap_gdtr - BOOT_OFFSET + AP_BOOT_OFFSET; | |
65 | protected_ap_gdtr = PA2KA(ap_gdtr); | |
66 | #endif /* CONFIG_SMP */ | |
[f1380b7] | 67 | |
[1141c1a] | 68 | } |
Note:
See TracBrowser
for help on using the repository browser.