Changeset 47b2d7e3 in mainline for uspace/lib/c/arch/ia64/_link.ld.in


Ignore:
Timestamp:
2018-03-30T21:35:15Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1433ecda
Parents:
5b8f731
Message:

Always load ELF headers as part of the text segment.

This forces us to align the start of the text segment to its
declared alignment, otherwise the linker would be forced to allocate
address 0, which the kernel doesn't allow.

Instead of setting the start differently based on each platform's
declared text alignment, set it always to 0x400000 (4 MB),
which is greater than the largest alignment among the currently
supported platforms (amd64, 2MB alignment), and also aligns with
large pages on all platforms that support them.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/ia64/_link.ld.in

    r5b8f731 r47b2d7e3  
    55#ifdef LOADER
    66        interp PT_INTERP;
    7         text PT_LOAD FLAGS(5);
    8 #else
    9         text PT_LOAD FLAGS(5);
    107#endif
     8        text PT_LOAD FILEHDR PHDRS FLAGS(5);
    119        data PT_LOAD FLAGS(6);
    1210}
     
    1412SECTIONS {
    1513#ifdef LOADER
    16         . = 0x800000000 + SIZEOF_HEADERS;
     14        . = SEGMENT_START("text-segment", 0x8000000000);
    1715#else
    18         . = 0x4000 + SIZEOF_HEADERS;
     16        . = SEGMENT_START("text-segment", 0x400000);
    1917#endif
     18#ifndef SHLIB
     19        PROVIDE (__executable_start = .);
     20#endif
     21        . = . + SIZEOF_HEADERS;
    2022
    2123        /* Workaround proper alignment of the .init section */
Note: See TracChangeset for help on using the changeset viewer.