DR_LENEH_FRM_OFFSETEH_FRM_LENTEXT_BASETEXT_SIZEx86_64-elfFortanix ABI for 64-bit Intel SGXvexvexoscortex-a9eabihf+v7,+neon,+vfp3d16,+thumb2OUTPUT_FORMAT("elf32-littlearm")
ENTRY(_boot)

/*
 * PROVIDE() is used here so that users can override default values.
 * This is intended to give developers the option to use this Rust
 * target even if the default values in this linker script aren't
 * suitable for their needs.
 *
 * For example: `-C link-arg=--defsym=__stack_length=8M` could
 * be used to increase the stack size above the value set in this
 * file.
 */

PROVIDE(__vcodesig_magic = 0x35585658);     /* XVX5                 */
PROVIDE(__vcodesig_type = 0);               /* V5_SIG_TYPE_USER     */
PROVIDE(__vcodesig_owner = 2);              /* V5_SIG_OWNER_PARTNER */
PROVIDE(__vcodesig_options = 0);            /* none (0)             */

PROVIDE(__user_ram_start = 0x03800000);
PROVIDE(__user_ram_length = 48M);
PROVIDE(__user_ram_end = __user_ram_start + __user_ram_length); /* 0x8000000 */

PROVIDE(__code_signature_length = 0x20);

PROVIDE(__stack_length = 4M);
PROVIDE(__heap_end = __user_ram_end - __stack_length);
PROVIDE(__user_length = __heap_start - __user_ram_start);

MEMORY {
    USER_RAM (RWX) : ORIGIN = __user_ram_start, LENGTH = __user_ram_length
}

SECTIONS {
    /*
     * VEXos expects program binaries to have a 32-byte header called a "code signature"
     * at their start which tells the OS that we are a valid program and configures some
     * miscellaneous startup behavior.
     */
    .code_signature : {
        LONG(__vcodesig_magic)
        LONG(__vcodesig_type)
        LONG(__vcodesig_owner)
        LONG(__vcodesig_options)

        FILL(0)
        . = __user_ram_start + __code_signature_length;
    } > USER_RAM

    /*
     * Executable program instructions.
     */
    .text : {
        /* _boot routine (entry point from VEXos, must be at 0x03800020) */
        *(.boot)

        /* The rest of the program. */
        *(.text .text.*)
    } > USER_RAM

    /*
     * Global/uninitialized/static/constant data sections.
     */
    .rodata : {
        *(.rodata .rodata1 .rodata.*)
        *(.srodata .srodata.*)
    } > USER_RAM

    /*
     * ARM Stack Unwinding Sections
     *
     * These sections are added by the compiler in some cases to facilitate stack unwinding.
     * __eh_frame_start and similar symbols are used by libunwind.
     */

    .except_ordered : {
        PROVIDE(__extab_start = .);
        *(.gcc_except_table *.gcc_except_table.*)
        *(.ARM.extab*)
        PROVIDE(__extab_end = .);
    } > USER_RAM

    .eh_frame_hdr : {
        /* see https://github.com/llvm/llvm-project/blob/main/libunwind/src/AddressSpace.hpp#L78 */
        PROVIDE(__eh_frame_hdr_start = .);
        KEEP(*(.eh_frame_hdr))
        PROVIDE(__eh_frame_hdr_end = .);
    } > USER_RAM

    .eh_frame : {
        PROVIDE(__eh_frame_start = .);
        KEEP(*(.eh_frame))
        PROVIDE(__eh_frame_end = .);
    } > USER_RAM

    .except_unordered : {
        PROVIDE(__exidx_start = .);
        *(.ARM.exidx*)
        PROVIDE(__exidx_end = .);
    } > USER_RAM

    /* -- Data intended to be mutable at runtime begins here. -- */

    .data : {
        *(.data .data1 .data.*)
        *(.sdata .sdata.* .sdata2.*)
    } > USER_RAM

    /* -- End of loadable sections - anything beyond this point shouldn't go in the binary uploaded to the device. -- */

    .bss (NOLOAD) : {
        __bss_start = .;
        *(.sbss*)
        *(.bss .bss.*)

        /* Align the heap */
        . = ALIGN(8);
        __bss_end = .;
    } > USER_RAM

    /*
     * Active memory sections for the stack/heap.
     *
     * Because these are (NOLOAD), they will not influence the final size of the binary.
     */
    .heap (NOLOAD) : {
        __heap_start = .;
        . = __heap_end;
    } > USER_RAM

    .stack (NOLOAD) : ALIGN(8) {
        __stack_bottom = .;
        . += __stack_length;
        __stack_top = .;
    } > USER_RAM

    /*
     * `.ARM.attributes` contains arch metadata for compatibility purposes, but we
     * only target one hardware configuration, meaning it'd just take up space.
     */
    /DISCARD/ : {
        *(.ARM.attributes*)
    }
}
ARMv7-A Cortex-A9 VEX V5 Braine-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64--fix-cortex-a53-843419+v8a,+strict-align,+neon,+fp-armv8nuttxAArch64 NuttX+v7,+thumb2,+vfp3,+neon,+strict-alignARMv7-A Cortex-A with NuttX (hard float)+v7,+thumb2,+soft-float,-neon,+strict-alignARMv7-A Cortex-A with NuttXBare ARM64, hardfloat+v8a,+strict-align,-neon,-fp-armv8Bare ARM64, softfloat-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2,+soft-floatx86_64-unknown-none-elfFreestanding/bare-metal x86_64 softfloataarch64_be-unknown-noneBare ARM64 (big-endian), softfloatE-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32+v7,+vfp3,-d32,+thumb2,-neon,+strict-alignBare Armv7-A, hardfloatBare Armv7-Asparc-elf-gccE-m:e-p:32:32-i64:64-i128:128-f128:64-n32-S64Bare 32-bit SPARC V7+M68010m68k-linux-gnu-ldMotorola 680x0E-m:e-p:32:16:32-i8:8:8-i16:16:16-i32:16:32-n8:16:32-a:0:16-S16-rdrnd,-aes,-pclmul,-rtm,-fsgsbaseyou need to adjust the feature list in x86_64h-apple-darwin if you change thisx86_64 Apple macOS with Intel Haswell+e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128