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