Changeset 33ef2f2 in mainline


Ignore:
Timestamp:
2018-11-13T20:22:20Z (5 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Parents:
948e85b
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-10-24 15:23:01)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-13 20:22:20)
Message:

Reduce differences between amd64 and ia32 ldscripts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/_link.ld.in

    r948e85b r33ef2f2  
    2323        kernel_load_address = PA2KA(BOOT_OFFSET);
    2424
    25         .ap_bootstrap (AP_BOOT_OFFSET): AT (AP_BOOT_OFFSET) {
    26                 ap_bootstrap_start = .;
     25        . = AP_BOOT_OFFSET + SIZEOF_HEADERS;
    2726
    28                 /* Must be first. */
    29                 *(.multiboot);
     27        /* Must be first. */
     28        .multiboot : { *(.multiboot); } :ap_boot
    3029
     30        ap_bootstrap_start = .;
     31
     32        .ap_bootstrap : {
    3133                *(K_AP_TEXT_START);
    3234                *(K_AP_DATA_START);
    33                 ap_bootstrap_end = .;
    3435        } :ap_boot
    3536
    36         .unmapped (BOOT_OFFSET): AT (BOOT_OFFSET) {
    37                 unmapped_start = .;
     37        ap_bootstrap_end = .;
     38
     39        . = BOOT_OFFSET + (ap_bootstrap_end & (PAGE_SIZE-1));
     40        unmapped_start = .;
     41
     42        .unmapped : {
    3843                *(K_TEXT_START);
    3944                *(K_DATA_START);
    4045                *(K_INI_PTLS);
    41                 unmapped_end = .;
    4246        } :unmapped
     47
     48        unmapped_file_end = .;
    4349
    4450        .unmapped_bss : {
    4551                *(.bootstack);
     52                *(K_BSS_START);
    4653        } :unmapped
    4754
    48         .mapped (PA2KA(BOOT_OFFSET) + SIZEOF(.unmapped) + SIZEOF(.unmapped_bss)) : AT (BOOT_OFFSET + SIZEOF(.unmapped) + SIZEOF(.unmapped_bss)) {
     55        unmapped_end = .;
     56        mapped_load_start = ALIGN(PAGE_SIZE) + (unmapped_file_end & (PAGE_SIZE-1));
     57
     58        .mapped (PA2KA(mapped_load_start)): AT (mapped_load_start) {
    4959                ktext_start = .;
    5060                *(.text .text.*);
     
    5262
    5363                kdata_start = .;
    54                 *(.data);              /* initialized data */
    55                 *(.rodata .rodata.*);  /* string literals */
    56                 *(COMMON);      /* global variables */
     64                *(.data);               /* initialized data */
     65                *(.rodata .rodata.*);   /* string literals */
     66                *(COMMON);              /* global variables */
    5767
    5868                /* bss can't be omitted from the ELF image. */
    59                 *(.bss);        /* uninitialized static variables */
     69                *(.bss);                /* uninitialized static variables */
    6070
    6171                . = ALIGN(8);
    6272                symbol_table = .;
    63                 *(symtab.*);    /* Symbol table, must be LAST symbol!*/
    64 
     73                *(symtab.*);            /* Symbol table, must be LAST symbol! */
    6574                kdata_end = .;
    6675        } :mapped
Note: See TracChangeset for help on using the changeset viewer.