ARM Architecture C 语言寻址解析——
从U-Boot relocation所展开的探索(三)
从U-Boot relocation所展开的探索(三)
by蔡于清
ARMArchitecture C语言PIC寻址方式解析(续)
继续讨论上一篇文章的问题,GOT所记录的是C的对象地址,但一个工程中往往还存在汇编代码定义的变量(事实上汇编语言中并不存在“变量”这一说法,这些所谓的“变量”更准确的讲是一个"Lable",C语言的指针变量名,比如main.c中定义的global_str,对汇编来说也是一个Lable,在接下来的文章里我们统一用Lable称呼这两者),如何对汇编的Lable进行relocate呢?如何得到需要relocate的Lable信息呢?命令行进入arm_pic目录,运行命令arm-none-eabi-readelf-r
继续讨论上一篇文章的问题,GOT所记录的是C的对象地址,但一个工程中往往还存在汇编代码定义的变量(事实上汇编语言中并不存在“变量”这一说法,这些所谓的“变量”更准确的讲是一个"Lable",C语言的指针变量名,比如main.c中定义的global_str,对汇编来说也是一个Lable,在接下来的文章里我们统一用Lable称呼这两者),如何对汇编的Lable进行relocate呢?如何得到需要relocate的Lable信息呢?命令行进入arm_pic目录,运行命令arm-none-eabi-readelf-r