source: mainline/kernel/arch/amd64/_link.ld.in@ b3f8fb7

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since b3f8fb7 was b3f8fb7, checked in by Martin Decky <martin@…>, 19 years ago

huge type system cleanup
remove cyclical type dependencies across multiple header files
many minor coding style fixes

  • Property mode set to 100644
File size: 1.6 KB
RevLine 
[c245372b]1/** AMD64 linker script
[1141c1a]2 *
3 * umapped section:
4 * kernel text
5 * kernel data
6 * mapped section:
7 * kernel text
8 * kernel data
9 */
10
[4f1475d4]11#include <arch/boot/boot.h>
12#include <arch/mm/page.h>
13
[1141c1a]14SECTIONS {
[8725fb4]15 .unmapped BOOT_OFFSET: AT (0) {
[1141c1a]16 unmapped_ktext_start = .;
17 *(K_TEXT_START);
18 unmapped_ktext_end = .;
[c4b3e3e]19
[1141c1a]20 unmapped_kdata_start = .;
21 *(K_DATA_START);
22 unmapped_kdata_end = .;
23 }
24
[8725fb4]25 .mapped (PA2KA(BOOT_OFFSET)+SIZEOF(.unmapped)) : AT (SIZEOF(.unmapped)) {
[1141c1a]26 ktext_start = .;
27 *(.text);
28 ktext_end = .;
29
30 kdata_start = .;
31 *(.data); /* initialized data */
32 *(.rodata*); /* string literals */
[c832cc0a]33 hardcoded_load_address = .;
[8725fb4]34 QUAD(PA2KA(BOOT_OFFSET));
[c832cc0a]35 hardcoded_ktext_size = .;
36 QUAD(ktext_end - ktext_start + (unmapped_ktext_end - unmapped_ktext_start));
37 hardcoded_kdata_size = .;
38 QUAD(kdata_end - kdata_start + (unmapped_kdata_end - unmapped_kdata_start));
[c4b3e3e]39 hardcoded_unmapped_ktext_size = .;
[42744880]40 QUAD(unmapped_ktext_end - unmapped_ktext_start);
[c4b3e3e]41 hardcoded_unmapped_kdata_size = .;
[42744880]42 QUAD(unmapped_kdata_end - unmapped_kdata_start);
[ab08b42]43 *(COMMON); /* global variables */
44
[c245372b]45 *(.eh_frame);
[ab08b42]46
47 symbol_table = .;
48 *(symtab.*); /* Symbol table, must be LAST symbol!*/
49
[3550c393]50 *(.bss); /* uninitialized static variables */
51
[1141c1a]52 kdata_end = .;
53 }
[42edee68]54
55#ifdef CONFIG_SMP
56 _hardcoded_unmapped_size = (unmapped_ktext_end - unmapped_ktext_start) + (unmapped_kdata_end - unmapped_kdata_start);
57 ap_boot = unmapped_ap_boot - BOOT_OFFSET + AP_BOOT_OFFSET;
58 ap_gdtr = unmapped_ap_gdtr - BOOT_OFFSET + AP_BOOT_OFFSET;
59 protected_ap_gdtr = PA2KA(ap_gdtr);
60
61#endif /* CONFIG_SMP */
62
[1141c1a]63}
Note: See TracBrowser for help on using the repository browser.