/*
*
*
*/
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);
__idata_start = . ;
.data : ALIGN(8)
{
__cs3_region_start_ram = .;
K60系列学习(二)链接脚本1
最新推荐文章于 2022-11-15 21:58:52 发布
本文详细探讨了链接脚本在K60系列中的应用,包括MEMORY命令解释,例如sram内存区域的描述,以及OUTPUT_ARCH()命令的作用,它用于指定输出文件的体系结构。同时,文章介绍了BFD库在目标文件操作中的重要性,解释了不同工具链如Sourcery_G++和gcc在BFD后端支持上的差异。此外,还讨论了SEARCH_DIR(), GROUP, ENTRY, EXTERN和PROVIDE等链接脚本命令的用法。"
8249931,292791,Windows管道实现跨进程函数调用,"['C++', '进程通讯', '管道', '函数调用']
摘要由CSDN通过智能技术生成