摘要
从Android链接加载系统入手,分析了系统目标文件格式及动态链接器的工作流程。结合Unicore32处理器架构特点,通过重新处理重定位符号、分配程序运行空间等方法实现了Unicore32架构下的动态链接器,重点分析了系统链接加载过程中与处理器架构紧密关联部分。引入了预链接处理工具——Apriori,通过重新分配动态库加载基地址、修改编译控制系统实现了链接优化技术Prelink。实验结果显示:动态链接器运行稳定,Prelink对动态链接性能提升明显,系统进程链接加载时间最高降低达51.47%。Prelink优化效果与程序依赖动态库数量成正比,能明显降低系统启动时间。
The linking and loading system of Android is analyzed,and the object file format and the working mechanism of the dynamic linker are introduced briefly.The architecture related portions are discussed in detail,especially the portions of loading and linking process,which is tightly coupled with the processor's architecture.Assisted by re-processing the relocated symbols and assigning the address space for the program running process,the dynamic linker based on Unicore32 architecture is implemented.Finally,Apriori which is used for the pre-link process is introduced for Prelink.After reallocating the loading address of the dynamic libraries and modifying the compiler control system,Prelink is ported to Unicore32 architecture.The experimental results show that the dynamic linker works efficiently on the Unicore32 architecture.The linking time for the system processes is reduced to 51.47%at most.The optimization results of Prelink are proportional to the number of dynamic libraries,which can optimize the system boot time apparently.
出处
《测控技术》
CSCD
2016年第5期101-105,110,共6页
Measurement & Control Technology
基金
江苏省"六大人才高峰"资助项目(2014-wlw-011)