【发布时间】:2015-03-26 05:50:31
【问题描述】:
关于ld 的AT (...) 指令,this source 声明:
AT ( ldadr )
The expression ldadr that follows the AT keyword specifies the load address of the section. The default (if you do not use the AT keyword) is to make the load address the same as the relocation address. This feature is designed to make it easy to build a ROM image.
我一直在搜索,但没有找到“加载地址”和“重定位地址”的明确定义。
我了解,当目标文件链接在一起时,代码会在跳转地址中“重新定位”,等等。被重写以指向组合机器代码中的正确偏移量。那么,“重定位地址”是结果目标代码中某个部分开始的偏移量吗?如果是这样,一个部分的“加载地址”怎么可能不同?
如果这两个地址不同,对链接器的输出有何影响?
【问题讨论】: