Linux链接器脚本详解
/*
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链接器脚本详解的更多相关文章
- Linux 开机自启动脚本详解
以kibana为例 以下为skibana名称的脚本内容 #!/bin/bash #chkconfig: 2345 80 90 #description:kibana kibana=" ...
- [转]Linux下的lds链接脚本详解
转载自:http://linux.chinaunix.net/techdoc/beginner/2009/08/12/1129972.shtml 一. 概论 每一个链接过程都由链接脚本(lin ...
- Linux下的lds链接脚本详解【转】
转自:http://www.cnblogs.com/li-hao/p/4107964.html 转载自:http://linux.chinaunix.net/techdoc/beginner/2009 ...
- Linux下的lds链接脚本详解
1. 概论2. 基本概念3. 脚本格式4. 简单例子5. 简单脚本命令6. 对符号的赋值7. SECTIONS命令8. MEMORY命令9. PHDRS命令10. VERSION命令11. 脚本内的表 ...
- 【转】linux中inittab文件详解
原文网址:http://www.2cto.com/os/201108/98426.html linux中inittab文件详解 init的进程号是1(ps -aux | less),从这一点就能看出, ...
- linux 开机启动过程详解
Linux开机执行内核后会启动init进程,该进程根据runlevel(如x)执行/etc/rcx.d/下的程序,其下的程序是符号链接,真正的程序放在/etc/init.d/下.开机启动的程序(服务等 ...
- 【嵌入式开发】 嵌入式开发工具简介 (裸板调试示例 | 交叉工具链 | Makefile | 链接器脚本 | eclipse JLink 调试环境)
作者 : 韩曙亮 博客地址 : http://blog.csdn.net/shulianghan/article/details/42239705 参考博客 : [嵌入式开发]嵌入式 开发环境 (远 ...
- Linux惊群效应详解
Linux惊群效应详解(最详细的了吧) linux惊群效应 详细的介绍什么是惊群,惊群在线程和进程中的具体表现,惊群的系统消耗和惊群的处理方法. 1.惊群效应是什么? 惊群效应也有人 ...
- FLASH动作脚本详解
FLASH动作脚本详解 一.FLASH脚本基础入门讲解 二.按钮AS的编写 三.影片剪辑的AS编写 四.动态文本框 五.影片剪辑的拖拽 六.流程控制与循环语句 七.绘图及颜色的AS的编写 八.声音 A ...
随机推荐
- [poj1509]Glass Beads(最小表示法)
题目大意:求循环同构的字符串的最小字典序. 解题关键:最小表示法模板题. #include<cstdio> #include<cstring> #include<algo ...
- C++面向对象类的实例题目八
题目描述: 编写一个程序输入3个学生的英语和计算机成绩,并按照总分从高到低排序.要求设计一个学生类Student,其定义如下: 程序代码: #include<iostream> using ...
- deb包制作(转)
deb 包已被广泛应用但是也在不断的更新,这里介绍Ubuntu deb包安装设置使用,帮助大家安装更新Ubuntu deb包系统.制作Ubuntu deb包的三种方法 | Sean's Blog [转 ...
- AR# 30522:LogiCORE RapidIO - How do system_reset and link_reset work?
Description How do system_reset and link_rest work? Solution lnk_linkreset_n (input): In Xilinx SRIO ...
- Markdown语法简介 | Markdown Tutorial
Markdown是一种轻量级标记语言,允许人们使用易读易写的纯文本格式编写文档,然后转换成有效的HTML文档. 与Word相比,使用Markdown最大的好处是可以使人们将注意力集中与文字本身而非排版 ...
- 文本PDG转PDF
作者:马健邮箱:stronghorse_mj@hotmail.com发布:2008.08.03更新:2008.08.24 补充说明:此文成文较早,当时文本PDG如果不想用官方浏览器SSREADER看, ...
- 【IIS】编译器失败,错误代码为 -2146232576
把新写的 ASP.NET MVC 代码发布到 阿里云虚拟机后,报如下错误: 编译器失败,错误代码为 -2146232576 参考了 iis 错误 -2146232576 和 asp.net mvc5本 ...
- Xamarin.Forms(一) 学习笔记
Xamarin.Forms是Xamarin跨平台开发app的跨平台的一个Framework,要使用这套Framework,要从XAML说起. XAML是同通过xml的方式来描述控件和动作,可以通过编译 ...
- unit vs单元测试
vs单元测试(unit) 一.什么是单元测试及它的作用? 在小量代码编写时,往往可以通过新建控制台项目(Console Application),新建网站项目(Web Form)等,在其中敲入测试代码 ...
- Python3中集合的混合使用
比较简单没什么好说的: list_1 = [1,2,3,4,6,3,2,5,7,8,2,1] list_1 = set(list_1) list_1.add(999) list_2 = set([2, ...