/*
 * This file was generated by linkcmd_bm_v7a.xdt from the gnu.target.arm  package.
 */

ENTRY(_c_int00)

__TI_STACK_SIZE = 0x400;
__STACK_SIZE = __TI_STACK_SIZE;

__HEAP_SIZE = 0x0;

INPUT(
    "C:\Project\Timer_A15\Debug\configPkg\package\cfg\app_pa15fg.oa15fg"
    "C:\Project\Timer_A15\src\sysbios\sysbios.aa15fg"
    "C:\ti\bios_6_52_00_12\packages\gnu\targets\arm\rtsv7A\lib\gnu.targets.arm.rtsv7A.aa15fg"
    "C:\ti\bios_6_52_00_12\packages\gnu\targets\arm\rtsv7A\lib\boot.aa15fg"
    "C:\ti\bios_6_52_00_12\packages\gnu\targets\arm\rtsv7A\lib\syscalls.aa15fg"
)

MEMORY
{
    SRAM (RWX) : org = 0x402f0000, len = 0x10000
    OCMC_RAM1 : org = 0x40300000, len = 0x80000
    OCMC_RAM2 : org = 0x40400000, len = 0x100000
    OCMC_RAM3 : org = 0x40500000, len = 0x100000
    EXT_RAM : org = 0x80000000, len = 0x80000000
}

/*
 * In order to put the .bass, .text, .data, .heap or .stack into a
 * different memory section, change the corresponding REGION_ALIAS.
 */
REGION_ALIAS("REGION_BSS", EXT_RAM);
REGION_ALIAS("REGION_TEXT", EXT_RAM);
REGION_ALIAS("REGION_DATA", EXT_RAM);
REGION_ALIAS("REGION_STACK", EXT_RAM);
REGION_ALIAS("REGION_HEAP", EXT_RAM);
REGION_ALIAS("REGION_ARM_EXTAB", EXT_RAM);
REGION_ALIAS("REGION_ARM_EXIDX", EXT_RAM);

/*
 * symbolic aliases for static instance objects
 */
xdc_runtime_Startup__EXECFXN__C = 1;
xdc_runtime_Startup__RESETFXN__C = 1;

/*
 * Linker command file contributions from all loaded packages:
 */

/* Content from ti.sysbios.family.arm (ti/sysbios/family/arm/linkcmd.xdt): */

/* Content from ti.sysbios.rts (ti/sysbios/rts/linkcmd.xdt): */

/* Content from ti.sysbios.family.arm.gic (ti/sysbios/family/arm/gic/linkcmd.xdt): */
ti_sysbios_family_arm_gic_Hwi_gicd = 1210126336;
ti_sysbios_family_arm_gic_Hwi_gicc = 1210130432;


SECTIONS {

        .vecs : {*(.vecs)}  AT> EXT_RAM
    ti.sysbios.family.arm.a15.mmuFirstLevelTableSection (NOLOAD) : {*(ti.sysbios.family.arm.a15.mmuFirstLevelTableSection)}  AT> EXT_RAM
    ti.sysbios.family.arm.a15.mmuSecondLevelTableSection0 (NOLOAD) : {*(ti.sysbios.family.arm.a15.mmuSecondLevelTableSection0)}  AT> EXT_RAM
    ti.sysbios.family.arm.a15.mmuSecondLevelTableSection1 (NOLOAD) : {*(ti.sysbios.family.arm.a15.mmuSecondLevelTableSection1)}  AT> EXT_RAM
    ti.sysbios.family.arm.a15.mmuSecondLevelTableSection2 (NOLOAD) : {*(ti.sysbios.family.arm.a15.mmuSecondLevelTableSection2)}  AT> EXT_RAM
    ti.sysbios.family.arm.a15.mmuSecondLevelTableSection3 (NOLOAD) : {*(ti.sysbios.family.arm.a15.mmuSecondLevelTableSection3)}  AT> EXT_RAM
    xdc.meta (COPY) : {KEEP(*(xdc.meta))}  AT> EXT_RAM


    .c_int00 : {
        KEEP (*(.c_int00))
    } > REGION_TEXT

    .text : {
        CREATE_OBJECT_SYMBOLS
        KEEP (*(.resetVecs))
        KEEP (*(.text))
        *(.text.*)
        *(.gnu.linkonce.t*)
        *(.gnu.warning)
        *(.glue*)
        . = ALIGN(0x4);
        KEEP (*(.ctors))
        *(.gnu.linkonce.r.*)
        . = ALIGN(0x4);
        __init_array_start = .;
        KEEP(*(SORT(.init_array.*)))
        KEEP(*(.init_array))
        __init_array_end = .;
        *(.init)
        *(.fini*)
    } > REGION_TEXT

    .rodata : {
        *(.rodata)
        *(.rodata.*)
    } > REGION_TEXT

    .ARM.extab : {
        *(.ARM.extab*)
        *(.gnu.linkonce.armextab.*)
    } > REGION_ARM_EXTAB

    .ARM.exidx : {
        __exidx_start = .;
        *(.ARM.exidx*)
        *(.gnu.linkonce.armexidx.*)
        __exidx_end = .;
    } > REGION_ARM_EXIDX

    etext   = .;
    _etext  = .;
    __etext = .;

    .data : {
        __data_load__ = LOADADDR (.data);
        __data_start__ = .;
        *(.got.plt)
        *(.got)
        *(.shdata)
        KEEP (*(.data))
        KEEP (*(.data*))
        *(.gnu.linkonce.d.*)
        . = ALIGN (4);
        __data_end__ = .;
    } > REGION_DATA AT> REGION_TEXT

    /*
     * Place .heap section before .bss and .stack as the _sbrk
     * implementation in librdimon.a compares the (heap_end + incr)
     * to the current SP value to check if the heap has overlapped
     * with the stack. 
     *
     * If .heap is placed between .bss and .stack in a SYS/BIOS app,
     * when the task stack (allocated in .bss) is the current stack,
     * the heap check in _sbrk will fail and trigger an error even
     * though the heap might not have actually overlapped with the
     * system stack.
     */
    .heap : ALIGN(0x100) {
        __heap_start__ = .;
        end = __heap_start__;
        _end = end;
        __end = end;
        . += __HEAP_SIZE;
        __heap_end__ = .;
        __HeapLimit = __heap_end__;
    } > REGION_HEAP

    .bss : {
        __bss_start__ = .;
        *(.shbss)
        KEEP (*(.bss))
        *(.bss.*)
        *(.gnu.linkonce.b.*)
        *(COMMON)
        . = ALIGN (4);
        __bss_end__ = .;
    } > REGION_BSS

    .stack : ALIGN(0x0008) {
        __TI_STACK_BASE = .;
        __stack = .;
        . += __TI_STACK_SIZE;
    } > REGION_STACK

    .stab           0 : { *(.stab) }
    .stabstr        0 : { *(.stabstr) }
    .stab.excl      0 : { *(.stab.excl) }
    .stab.exclstr   0 : { *(.stab.exclstr) }
    .stab.index     0 : { *(.stab.index) }
    .stab.indexstr  0 : { *(.stab.indexstr) }
    .comment        0 : { *(.comment) }

    .debug          0 : { *(.debug) }
    .line           0 : { *(.line)  }
    .debug_srcinfo  0 : { *(.debug_srcinfo) }
    .debug_sfnames  0 : { *(.debug_sfnames) }
    .debug_aranges  0 : { *(.debug_aranges) }
    .debug_pubnames 0 : { *(.debug_pubnames) }
    .debug_info     0 : { *(.debug_info) }
    .debug_abbrev   0 : { *(.debug_abbrev) }
    .debug_line     0 : { *(.debug_line) }
    .debug_frame    0 : { *(.debug_frame) }
    .debug_str      0 : { *(.debug_str) }
    .debug_loc      0 : { *(.debug_loc) }
    .debug_macinfo  0 : { *(.debug_macinfo) }
    .debug_weaknames    0 : { *(.debug_weaknames) }
    .debug_funcnames    0 : { *(.debug_funcnames) }
    .debug_typenames    0 : { *(.debug_typenames) }
    .debug_varnames     0 : { *(.debug_varnames) }
    .debug_pubtypes     0 : { *(.debug_pubtypes) }
    .debug_ranges       0 : { *(.debug_ranges) }

}

/* function aliases */
xdc_runtime_System_asprintf_va__E = xdc_runtime_System_asprintf_va__F;
xdc_runtime_System_snprintf_va__E = xdc_runtime_System_snprintf_va__F;
xdc_runtime_System_printf_va__E = xdc_runtime_System_printf_va__F;
xdc_runtime_System_aprintf_va__E = xdc_runtime_System_aprintf_va__F;
xdc_runtime_System_sprintf_va__E = xdc_runtime_System_sprintf_va__F;
