ticket/834-toolchain-update
topic/msim-upgrade
topic/simplify-dev-export
Last change
on this file since f114d40 was 15639ec, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 7 years ago |
Fix up x86 linker scripts a bit
|
-
Property mode
set to
100644
|
File size:
1.6 KB
|
Line | |
---|
1 | /** AMD64 linker script
|
---|
2 | *
|
---|
3 | * umapped section:
|
---|
4 | * kernel text
|
---|
5 | * kernel data
|
---|
6 | * mapped section:
|
---|
7 | * kernel text
|
---|
8 | * kernel data
|
---|
9 | */
|
---|
10 |
|
---|
11 | #include <arch/boot/boot.h>
|
---|
12 | #include <arch/mm/page.h>
|
---|
13 |
|
---|
14 | SECTIONS {
|
---|
15 | kernel_load_address = PA2KA(BOOT_OFFSET);
|
---|
16 |
|
---|
17 | .unmapped (BOOT_OFFSET + SIZEOF_HEADERS): AT (BOOT_OFFSET + SIZEOF_HEADERS) {
|
---|
18 | unmapped_start = .;
|
---|
19 | *(K_TEXT_START);
|
---|
20 | *(K_DATA_START);
|
---|
21 | *(K_INI_PTLS);
|
---|
22 | unmapped_end = .;
|
---|
23 | }
|
---|
24 |
|
---|
25 | .mapped (PA2KA(BOOT_OFFSET) + SIZEOF_HEADERS + SIZEOF(.unmapped)) : AT (BOOT_OFFSET + SIZEOF_HEADERS + SIZEOF(.unmapped)) {
|
---|
26 | ktext_start = .;
|
---|
27 | *(.text .text.*);
|
---|
28 | ktext_end = .;
|
---|
29 |
|
---|
30 | kdata_start = .;
|
---|
31 | *(.data); /* initialized data */
|
---|
32 | *(.rodata .rodata.*); /* string literals */
|
---|
33 | *(COMMON); /* global variables */
|
---|
34 |
|
---|
35 | /* bss can't be omitted from the ELF image. */
|
---|
36 | *(.bss); /* uninitialized static variables */
|
---|
37 |
|
---|
38 | . = ALIGN(8);
|
---|
39 | symbol_table = .;
|
---|
40 | *(symtab.*); /* Symbol table, must be LAST symbol!*/
|
---|
41 |
|
---|
42 | kdata_end = .;
|
---|
43 | }
|
---|
44 |
|
---|
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
|
---|
57 |
|
---|
58 | /DISCARD/ : {
|
---|
59 | *(*);
|
---|
60 | }
|
---|
61 |
|
---|
62 | #ifdef CONFIG_SMP
|
---|
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 */
|
---|
67 |
|
---|
68 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.