OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") OUTPUT_ARCH(arm) CSTACK_SIZE = 0x1000; SVC_STACK_SIZE = 0x1000; IRQ_STACK_SIZE = 0x80; FIQ_STACK_SIZE = 0x1000; UND_STACK_SIZE = 0x80; ABT_STACK_SIZE = 0x80; ENTRY(Reset_Handler) MEMORY { TCM (RW) : ORIGIN = 0x004E0000, LENGTH = 0x00020000 } SECTIONS { /* PrgCode */ PrgCode : { _PRGCODE_start = .; KEEP(*(.PRGCODE .PRGCODE.*)) _PRGCODE_end = .; } > TCM /* T32CodeBegin */ T32CodeBegin : { _T32CODEBEGIN_start = .; KEEP(*(.T32CODEBEGIN .T32CODEBEGIN.*)) _T32CODEBEGIN_end = .; } > TCM /* FuseCode */ FuseCode : { _FUSECODE_start = .; KEEP(*(.FUSECODE .FUSECODE.*)) _FUSECODE_end = .; } > TCM /* PrgData */ PrgData : { _PRGDATA_start = .; KEEP(*(.PRGDATA .PRGDATA.*)) _PRGDATA_end = .; } > TCM /* DevDscr */ DevDscr : { _DEVDSCR_start = .; KEEP(*(.DEVDSCR .DEVDSCR.*)) _DEVDSCR_end = .; } > TCM /* text/read-only data */ .text : { *(.text* .sram.text.glue_7* .gnu.linkonce.t.*) } > TCM .dummy_post_text : { __code_end = .; } > TCM .rodata : ALIGN(4) { __rodata_start = .; __fault_handler_table_start = .; KEEP(*(.rodata.fault_handler_table)) __fault_handler_table_end = .; *(.rodata .rodata.* .gnu.linkonce.r.*) } > TCM /* * extra linker scripts tend to insert sections just after .rodata, * so we want to make sure this symbol comes after anything inserted above, * but not aligned to the next section necessarily. */ .dummy_post_rodata : { __rodata_end = .; } > TCM .data : ALIGN(4) { __data_start = .; *(.data .data.* .gnu.linkonce.d.*) __commands_start = .; KEEP (*(.commands)) __commands_end = .; } > TCM .ctors : ALIGN(4) { __ctor_list = .; KEEP(*(.ctors .init_array)) __ctor_end = .; } > TCM .dtors : ALIGN(4) { __dtor_list = .; KEEP(*(.dtors .fini_array)) __dtor_end = .; } > TCM .nocache : ALIGN(1024) { _nocacheable_start = .; KEEP(*(.nocache)) . = ALIGN(1024); _nocacheable_end = .; } > TCM .dummy_post_data : { /* End of initialized sections. */ __data_end = ALIGN(4); } > TCM /* uninitialized data (in same segment as writable data) */ .bss (NOLOAD) : ALIGN(4) { KEEP(*(.bss.prebss.*)) . = ALIGN(4); __bss_start = .; *(.bss .bss.*) *(.gnu.linkonce.b.*) *(COMMON) . = ALIGN(4); __bss_end = .; } > TCM _end = .; .heap (NOLOAD) : ALIGN(8) { _heap_start = .; . += 0x1000; _heap_end = .; } > TCM .except.stack (NOLOAD) : ALIGN(8) { __except_stack_start = .; . += CSTACK_SIZE; __cstack_end = .; . += SVC_STACK_SIZE; __svc_stack_end = .; . += IRQ_STACK_SIZE; __irq_stack_end = .; . += FIQ_STACK_SIZE; __fiq_stack_end = .; . += UND_STACK_SIZE; __und_stack_end = .; . += ABT_STACK_SIZE; __abt_stack_end = .; __except_stack_end = .; } > TCM /* flashbuf */ .flashbuf (NOLOAD) : ALIGN(4) { _flashbuf_start = .; . += 0x1000; _flashbuf_end = .; } > TCM /* T32CodeEnd */ T32CodeEnd : { _T32CODEEND_start = .; KEEP(*(.T32CODEEND .T32CODEEND.*)) _T32CODEEND_end = .; } > TCM /* Strip unnecessary stuff */ /DISCARD/ : { *(.comment .note) } }