/*
*
*
*/
MEMORY
{
flash : ORIGIN = 0x00000000, LENGTH = 512k
sram : ORIGIN = 0x1FFF0000, LENGTH = 128k
}
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm","elf32-littlearm")
OUTPUT_ARCH(arm)
SEARCH_DIR(.)
GROUP(-lgcc -lc -lm -lcs3 -lcs3unhosted)
ENTRY(system_start)
/* These force the linker to search for particular symbols from
* the start of the link process and thus ensure the user's
* overrides are picked up
*/
EXTERN(__cs3_start_c main __cs3_stack __cs3_heap_end)
/* force exit to be picked up in a hosted or os environment */
/* EXTERN(exit atexit) */
PROVIDE(__cs3_heap_start = _end);
PROVIDE(__cs3_heap_end = __cs3_region_start_ram + __cs3_region_size_ram);
PROVIDE(__cs3_region_num = (__cs3_regions_end - __cs3_regions) / 20);
/*__libc_fini = _fini;*/
PROVIDE(__cs3_stack = __cs3_region_start_ram + __cs3_region_size_ram);
SECTIONS
{
. = ALIGN(4);
/* .text */
.text :
{
__text = . ;
KEEP(*(.vector))
*(.text*)
*(.glue_7t)
*(.glue_7)
} > sram
.eh_frame_hdr : ALIGN (4)
{
KEEP (*(.eh_frame_hdr))
} > sram
.eh_frame : ALIGN (4)
{
KEEP (*(.eh_frame))
} > sram
/* .ARM.exidx is sorted, so has to go in its own output section. */
__exidx_start = .;
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} > sram
__exidx_end = .;
.rodata : ALIGN(4)
{
*(.rodata .rodata.* .gnu.linkonce.r.*)
. = ALIGN(4);
__cs3_regions = .;
LONG (0)
LONG (__cs3_region_init_ram)
LONG (__cs3_region_start_ram)
LONG (__cs3_region_init_size_ram)
LONG (__cs3_region_zero_size_ram)
__cs3_regions_end = .;
. = ALIGN (8);
_etext = .;
} > sram
. = ALIGN(4);
K60系列学习(二)链接脚本1
最新推荐文章于 2024-05-03 20:24:08 发布
