无非下面两种方法: (1) 可重定位代码(relocatable code):Windows DLL 以及不使用 -fPIC 的 Linux SO。 生成动态库时假定它被加载在地址 0 处。
基于16个网页-相关网页
relocatable code addressing mode 浮动码寻址方式
Relocatable Addressing Modes Code 可重寻址码寻址模态 ; 可复位位
relocatable machine code [计] 重定位机器代码
relocatable object code 浮动结果代码 ; 腐目标代码
It can now just find a block of memory and then add the starting space to each of the relocatable addresses inside the code.
它只要找到一个内存块,然后把代码里每一个重定位的地址加上起始地址即可。
The final step is to use a locator to fix the remaining relocatable addresses within the code.
最后一步是使用定位程序去整理保留在代码中的可重定位地址。
The first layer is pure, relocatable assembler code.
第一层是纯的汇编代码。
应用推荐