
链接脚本
田园诗人之园
我是一位平凡的诗人,也是一位平凡的工程师。
展开
-
链接脚本-变量使用中遇到一个问题
最近在使用链接脚本变量的时候遇到一个问题,示例如下:uint32_t *gps_ram_end = (uint32_t *)&_ereserdata;uint32_t *gps_ram_start = (uint32_t *)&_sreserdata;uint32_t len = gps_ram_end - gps_ram_start;虽然gps_ram_end = 0x10800, gps_ram_start = 0x10000,但是len的值却是512,后来尝试使用下原创 2021-04-29 22:21:51 · 358 阅读 · 0 评论 -
How to use variable in link script
Hence when you are using a linker script defined symbol in source code you should alwaystake the address of the symbol, and never attempt to use its value. For example supposeyou want to copy the contents of a section of memory called .ROM into a section原创 2020-06-10 16:05:24 · 210 阅读 · 0 评论 -
.bss .data .rodata .text stack and heap
section: .text .data .bss .rodata stack heap, user-defined section.text code.data global and static init variable, 即占文件空间,又占用运行时内存空间的.bss uninit global and static variable只占运行时的内存空间,而不占文件空间.rodata const dataStack local variable and paramH原创 2020-06-10 16:04:23 · 358 阅读 · 0 评论 -
链接脚本-让LMA或者VMA按照特定字节对齐
Output Section Descriptionsection [address] [(type)] :[AT(lma)][ALIGN(section_align)][SUBALIGN(subsection_align)][constraint]{output-section-commandoutput-section-command…} [>region] [AT&...原创 2019-09-04 17:35:40 · 970 阅读 · 0 评论 -
link script-difference between VMA and LMA
Every loadable or allocatable output section has two addresses. The first is the VMA, orvirtual memory address. This is the address the section will have when the output file isrun. The second is th...原创 2019-09-04 18:03:35 · 329 阅读 · 0 评论