c - 我无法从链接描述文件的 .text 部分中排除文件
问题描述
.text :
{
. = ALIGN(4);
*(EXCLUDE_FILE(*blink.c.obj) .text .text*) /* Exclude blink from this section */
*(.glue_7) /* glue arm to thumb code */
*(.glue_7t) /* glue thumb to arm code */
*(.eh_frame)
KEEP (*(.init))
KEEP (*(.fini))
. = ALIGN(4);
_etext = .; /* define a global symbols at end of code */
} >FLASH
_load_flash_start = _etext; /* define a global symbol that starts at LOAD_FLASH */
.fast_code_section:
{
/*. = ALIGN(4);*/
. = _etext;
_fast_code_start = .; /* define a global symbol at start of FAST_RAM */
*(.fast_code_section*)
*blink.c.obj (.text .text*)
_fast_code_end = .; /* define a global symbol at end of FAST_RAM */
} >FAST_RAM AT> LOAD_FLASH
我想通过在链接描述文件中使用 EXCLUDE_FILE 来排除要分配到 .text 部分(FLASH)的文件 blink.c。我想要另一个部分(.fast_code_section)中的blink.c文件。
当我查看 .map 文件时,我可以看到 blink.c 中的所有函数仍分配给 .text 部分。
我正在使用 gcc,目标平台是 stm32
解决方案
推荐阅读
- https - Google 网站管理员主站点版本 https://non-www 但收到带有 http://www 版本的“幻影”结果
- python - 转换为类或作为模块导入的 Python 脚本执行速度慢得多?
- c++11 - 如何在c ++中获取指向std :: set头的指针
- javascript - 使用破折号更新实时烛台图时遇到问题
- .net - 让 DataAdapter 获取新版本的修改表
- javascript - 使用 ng-sidebar 作为 sidenav
- powershell - 安装 posh-git 时遇到问题
- android - 无法使用 Kotlin 将消息写入文件
- apache - Apache 上的 301 重定向:与 HTTP 冲突 => HTTPS 重写规则
- go - 多个 goroutine 和一个通道的死锁