Subversion Repositories HelenOS

Rev

Rev 3157 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

/*
 * The only difference from _link.ld.in for regular statically-linked apps
 * is the base address.
 */
STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o)
ENTRY(__entry)

PHDRS {
    interp PT_INTERP;
    text PT_LOAD FLAGS(5);
    data PT_LOAD FLAGS(6);
}

SECTIONS {
    .interp : {
        *(.interp);
    } :interp

    . = 0x70004000;
    
    .init ALIGN(0x4000) : SUBALIGN(0x4000) {
        *(.init);
    } :text
    .text : {
            *(.text);
        *(.rodata*);
    } :text

    .data : {
        *(.data);
        *(.data.rel*);
    } :data

    .got : {
        _gp = .;
        *(.got);
    } :data

    .tdata : {
        _tdata_start = .;
        *(.tdata);
        _tdata_end = .;
    } :data
    .tbss : {
        _tbss_start = .;
        *(.tbss);
        _tbss_end = .;
    } :data
    _tls_alignment = MAX(ALIGNOF(.tdata), ALIGNOF(.tbss));

    .sbss : {
        *(.scommon);
        *(.sbss);
    }   
    .bss : {
        *(.bss);
        *(COMMON);
    } :data

    . = ALIGN(0x4000);
    _heap = .;

    /DISCARD/ : {
        *(*);
    }
}