/*
GNU linker script for STM32F405
*/ /* Specify the memory areas */
MEMORY
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 0x100000 /* entire flash, 1 MiB */
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 0x004000 /* sector 0, 16 KiB */
FLASH_TEXT (rx) : ORIGIN = 0x08020000, LENGTH = 0x080000 /* sectors 5,6,7,8, 4*128KiB = 512 KiB (could increase it more) */
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 0x010000 /* 64 KiB */
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 0x020000 /* 128 KiB */
} /* top end of the stack */
_estack = ORIGIN(RAM) + LENGTH(RAM); /* RAM extents for the garbage collector */
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
_heap_end = 0x2001c000; /* tunable */ /* define output sections */
SECTIONS
{
/* The startup code goes first into FLASH */
.isr_vector :
{
. = ALIGN();
KEEP(*(.isr_vector)) /* Startup code */ . = ALIGN();
} >FLASH_ISR /* The program code and other data goes into FLASH */
.text :
{
. = ALIGN();
*(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
/* *(.glue_7) */ /* glue arm to thumb code */
/* *(.glue_7t) */ /* glue thumb to arm code */ . = ALIGN();
_etext = .; /* define a global symbol at end of code */
_sidata = _etext; /* This is used by the startup in order to initialize the .data secion */
} >FLASH_TEXT /*
.ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} >FLASH .ARM :
{
__exidx_start = .;
*(.ARM.exidx*)
__exidx_end = .;
} >FLASH
*/ /* This is the initialized data section
The program executes knowing that the data is in the RAM
but the loader puts the initial values in the FLASH (inidata).
It is one task of the startup to copy the initial values from FLASH to RAM. */
.data : AT ( _sidata )
{
. = ALIGN();
_sdata = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */
_ram_start = .; /* create a global symbol at ram start for garbage collector */
*(.data) /* .data sections */
*(.data*) /* .data* sections */ . = ALIGN();
_edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */
} >RAM /* Uninitialized data section */
.bss :
{
. = ALIGN();
_sbss = .; /* define a global symbol at bss start; used by startup code */
*(.bss)
*(.bss*)
*(COMMON) . = ALIGN();
_ebss = .; /* define a global symbol at bss end; used by startup code */
} >RAM /* this is to define the start of the heap, and make sure we have a minimum size */
.heap :
{
. = ALIGN();
_heap_start = .; /* define a global symbol at heap start */
} >RAM /* this just checks there is enough RAM for the stack */
.stack :
{
. = ALIGN();
} >RAM /* Remove information from the standard libraries */
/*
/DISCARD/ :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
}
*/ .ARM.attributes : { *(.ARM.attributes) }
}

Linux链接器脚本详解的更多相关文章

  1. Linux 开机自启动脚本详解

    以kibana为例     以下为skibana名称的脚本内容 #!/bin/bash #chkconfig: 2345 80 90 #description:kibana kibana=" ...

  2. [转]Linux下的lds链接脚本详解

    转载自:http://linux.chinaunix.net/techdoc/beginner/2009/08/12/1129972.shtml     一. 概论 每一个链接过程都由链接脚本(lin ...

  3. Linux下的lds链接脚本详解【转】

    转自:http://www.cnblogs.com/li-hao/p/4107964.html 转载自:http://linux.chinaunix.net/techdoc/beginner/2009 ...

  4. Linux下的lds链接脚本详解

    1. 概论2. 基本概念3. 脚本格式4. 简单例子5. 简单脚本命令6. 对符号的赋值7. SECTIONS命令8. MEMORY命令9. PHDRS命令10. VERSION命令11. 脚本内的表 ...

  5. 【转】linux中inittab文件详解

    原文网址:http://www.2cto.com/os/201108/98426.html linux中inittab文件详解 init的进程号是1(ps -aux | less),从这一点就能看出, ...

  6. linux 开机启动过程详解

    Linux开机执行内核后会启动init进程,该进程根据runlevel(如x)执行/etc/rcx.d/下的程序,其下的程序是符号链接,真正的程序放在/etc/init.d/下.开机启动的程序(服务等 ...

  7. 【嵌入式开发】 嵌入式开发工具简介 (裸板调试示例 | 交叉工具链 | Makefile | 链接器脚本 | eclipse JLink 调试环境)

    作者 : 韩曙亮 博客地址 : http://blog.csdn.net/shulianghan/article/details/42239705  参考博客 : [嵌入式开发]嵌入式 开发环境 (远 ...

  8. Linux惊群效应详解

    Linux惊群效应详解(最详细的了吧)   linux惊群效应 详细的介绍什么是惊群,惊群在线程和进程中的具体表现,惊群的系统消耗和惊群的处理方法. 1.惊群效应是什么?        惊群效应也有人 ...

  9. FLASH动作脚本详解

    FLASH动作脚本详解 一.FLASH脚本基础入门讲解 二.按钮AS的编写 三.影片剪辑的AS编写 四.动态文本框 五.影片剪辑的拖拽 六.流程控制与循环语句 七.绘图及颜色的AS的编写 八.声音 A ...

随机推荐

  1. oracle DDL(create、alter、drop)

    一.创建表1.创建表CREATE TABLE <table_name>( column1 DATATYPE [NOT NULL] [PRIMARY KEY], column2 DATATY ...

  2. SQL Server连接Oracle FAIL

    第一步 安装好oracle客户端Oracle 11.2.0.3 Client Win 64-bit,并配置好TNS信息 第二步,配置odbc信息 配置好odbc连接信息,sql server肯定不能直 ...

  3. android官方手册学习笔记

    数据存储 在提交sharedpreference 修改的时候,用apply代替commit 避免UI线程阻塞   设备兼容 系统会自动根据当前屏幕的大小等,在相应的文件夹里去找资源,如large等等 ...

  4. 框架之 hibernate之二

    1. Hibernate持久化对象的状态 2. Hibernate的一级缓存 3. Hibernate操作持久化对象的方法 4. Hibernate的基本查询 Hibernate的持久化类 什么是持久 ...

  5. 71-n皇后

    N皇后问题 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submi ...

  6. 算法Sedgewick第四版-第1章基础-023-MultiwordSearch.java

    Multi-word search. Program MultiwordSearch.java reads a sequence of query words q[1], ..., q[k] from ...

  7. JavaPersistenceWithHibernate第二版笔记-第六章-Mapping inheritance-006Mixing inheritance strategies(@SecondaryTable、@PrimaryKeyJoinColumn、<join fetch="select">)

    一.结构 For example, you can map a class hierarchy to a single table, but, for a particular subclass, s ...

  8. 如果客户端禁用了cookie,如何实现session

    虽然客户端禁用了cookie,那么当访问某一个php文件时,php会先查找php.ini,如果session.use_trans_sid=1/session.use_only_cookie=0,php ...

  9. 动态tab页

    1.前台代码 <%-- builed by manage.aspx.cmt  [ver:2015.25.26] at 2015-06-26 15:25:42 --%> <%@ Pag ...

  10. 数据库commit问题

    对数据库进行修改后,需要commit!---之前也是忘记commit导致数据库反应不过来.