-----------------------------------------------------------------
下面以boot270工程为例子分析:
输出的Image Symbol Table
Global Symbols
Symbol Name Value Ov Type Size Object(Section)
xlli_read_SCR 0xa000cea0 ARM Code 420 xlli_LowLev_Init.o(text)
可以看出xlli_read_SCR为ARM Code,是一个标号label,值即为其在bin中的地址,由于设置RO Base为0xA0000000,所以在bin中找0x0000cea0处的指令:

指令为E59F_419C,即为
xlli_read_SCR FUNCTION
;
; Insure the RDH and PH bits on PXA27x must be clear to enable GPIO pins.
; They are sticky bits so they must be set to clear them.
;
ldr r4, =xlli_PMRCREGS_PHYSICAL_BASE
该指令表示(E表示AL,无条件,F为R15=PC,4表示放到R4里,地址为PC+19C=D03C,再加2*4为D044)

0x0000d044处的数据为40F00000,与代码中的数据吻合:
; POWER MANAGER base address and register offsets from the base address
;
xlli_PMRCREGS_PHYSICAL_BASE EQU 0x40F00000
这个数据在Image Symbol Table中也能找到,在Local Symbols中:
xlli_PMRCREGS_PHYSICAL_BASE 0x40f00000 Number 0 main_Flash.o ABSOLUTE
能看到是一个Number,值value为0x40f00000。
这个数据的地址在Image Symbol Table中也能看到:
Mapping Symbols
Sym Value Execution Region
$d 0xa000d044 ER_RO
$d表示数据data。
下一条指令:
; Get, and save the present GPIO settings for direction registers 0, 1 and 2
;
ldr r4, =xlli_GPIOREGS_PHYSICAL_BASE ; Get the GPIO registers base address

指令为:E5_9F_4_194
数据的地址为:PC+194+2*4=D048

数据为:40E0 0000,与代码中的定义对应:
; GENERAL PURPOSE I/O (GPIO) base address and register offsets from the base address
;
xlli_GPIOREGS_PHYSICAL_BASE EQU 0x40E00000
地址0x0000 D048在Image Symbol Table中没有,不过有:
Mapping Symbols
Sym Value Execution Region
$d 0xa000d044 ER_RO
说明从0xa000d044处开始为许多RO data
|