KEIL生成的ELF格式文件分析

时间:2014-02-26 05:28:33   收藏:0   阅读:428

ARMCC库的分离方法

【库是以AR格式存放的】


惭愧,还是没结果,唉,还是希望能有人能解答,总觉得做技术还是深究一步的好。

为了鼓励看贴的同仁,附上对KEIL C语言的运行库分析步骤:

1.可从 map文件中查到你的程序中用到哪些库中的函数及在哪个库中

2.运行库的目录为:keil\arm\rv31\lib\armlib

3.用armar -x 命令从库中解出相应的.o文件

4.用fromelf -c 命令反汇编相应的.o文件,也可加-output 来何在反汇编结果到文件中

具体命令参数可直接打命令查看



【ELF格式现在不仔细分析,等学到GCC的时候再去分析】

【不过学GCC之前要去学linux应用开发和BSP开发,还有很多路要走】




生成命令:


bubuko.com,布布扣bubuko.com,布布扣

程序源码:

stm32f10x_startup.s

;***************************************************************************************
; Amount of memory (in bytes) allocated for Stack and Heap
; Tailor those values to your application needs          
;***************************************************************************************
Stack_Size   EQU     0x400
Heap_Size    EQU     0x200

;*******************************************************************************
; Allocate space for the Stack
;*******************************************************************************
  AREA    STACK, NOINIT, READWRITE, ALIGN=3

Stack
    SPACE   Stack_Size

;*******************************************************************************
; Allocate space for the Heap
;*******************************************************************************
  AREA    HEAP, NOINIT, READWRITE, ALIGN=3

Heap
    SPACE   Heap_Size

;********************************************************************************
;*  Declarations for the interrupt handlers that are used by the application.                                                                     
;********************************************************************************
  		IMPORT  __main

  		IMPORT  OSPendSV
  		IMPORT  SysTickHandler
  		IMPORT  WWDG_IRQHandler
  		IMPORT  PVD_IRQHandler
  		IMPORT  TAMPER_IRQHandler
  		IMPORT  RTC_IRQHandler
  		IMPORT  FLASH_IRQHandler
  		IMPORT  RCC_IRQHandler
  		IMPORT  EXTI0_IRQHandler
  		IMPORT  EXTI1_IRQHandler
  		IMPORT  EXTI2_IRQHandler
  		IMPORT  EXTI3_IRQHandler
  		IMPORT  EXTI4_IRQHandler
  		IMPORT  DMAChannel1_IRQHandler
  		IMPORT  DMAChannel2_IRQHandler
  		IMPORT  DMAChannel3_IRQHandler
  		IMPORT  DMAChannel4_IRQHandler
  		IMPORT  DMAChannel5_IRQHandler
  		IMPORT  DMAChannel6_IRQHandler
  		IMPORT  DMAChannel7_IRQHandler
  		IMPORT  ADC_IRQHandler
  		IMPORT  USB_HP_CAN_TX_IRQHandler
  		IMPORT  USB_LP_CAN_RX0_IRQHandler
  		IMPORT  CAN_RX1_IRQHandler
  		IMPORT  CAN_SCE_IRQHandler
  		IMPORT  EXTI9_5_IRQHandler
  		IMPORT  TIM1_BRK_IRQHandler
  		IMPORT  TIM1_UP_IRQHandler
  		IMPORT  TIM1_TRG_COM_IRQHandler
  		IMPORT  TIM1_CC_IRQHandler
  		IMPORT  TIM2_IRQHandler
  		IMPORT  TIM3_IRQHandler
  		IMPORT  TIM4_IRQHandler
  		IMPORT  I2C1_EV_IRQHandler
  		IMPORT  I2C1_ER_IRQHandler
  		IMPORT  I2C2_EV_IRQHandler
  		IMPORT  I2C2_ER_IRQHandler
  		IMPORT  SPI1_IRQHandler
  		IMPORT  SPI2_IRQHandler
  		IMPORT  USART1_IRQHandler
  		IMPORT  USART2_IRQHandler
  		IMPORT  USART3_IRQHandler
  		IMPORT  EXTI15_10_IRQHandler
  		IMPORT  RTCAlarm_IRQHandler
  		IMPORT  USBWakeUp_IRQHandler

		IMPORT     TIM8_BRK_IRQHandler       ; TIM8 Break
		IMPORT     TIM8_UP_IRQHandler        ; TIM8 Update
		IMPORT     TIM8_TRG_COM_IRQHandler   ; TIM8 Trigger and Commutation
		IMPORT     TIM8_CC_IRQHandler        ; TIM8 Capture Compare
		IMPORT     ADC3_IRQHandler           ; ADC3
		IMPORT     FSMC_IRQHandler           ; FSMC
		IMPORT     SDIO_IRQHandler           ; SDIO
		IMPORT     TIM5_IRQHandler           ; TIM5
		IMPORT     SPI3_IRQHandler           ; SPI3
		IMPORT     UART4_IRQHandler          ; UART4
		IMPORT     UART5_IRQHandler          ; UART5
		IMPORT     TIM6_IRQHandler           ; TIM6
		IMPORT     TIM7_IRQHandler           ; TIM7
		IMPORT     DMA2_Channel1_IRQHandler  ; DMA2 Channel1
		IMPORT     DMA2_Channel2_IRQHandler  ; DMA2 Channel2
		IMPORT     DMA2_Channel3_IRQHandler  ; DMA2 Channel3
		IMPORT     DMA2_Channel4_5_IRQHandler ; DMA2 Channel4 & Channel5
  
          
		PRESERVE8

;**********************************************************************************
;*  Reset code section.                                                                                                           
;**********************************************************************************
        AREA    RESET, CODE, READONLY
        THUMB

;*******************************************************************************
; Fill-up the Vector Table entries with the exceptions ISR address
;*******************************************************************************
    	EXPORT  __Vectors
__Vectors                      
    	DCD  Stack + Stack_Size            ; Top of Stack
    	DCD  Reset_Handler
    	DCD  NMIException
    	DCD  HardFaultException
    	DCD  MemManageException
    	DCD  BusFaultException
    	DCD  UsageFaultException
    	DCD  0                 ; Reserved
    	DCD  0                 ; Reserved
    	DCD  0                 ; Reserved
    	DCD  0                 ; Reserved
    	DCD  SVCHandler
    	DCD  DebugMonitor
    	DCD  0                 ; Reserved
    	DCD  OSPendSV
    	DCD  SysTickHandler
    	DCD  WWDG_IRQHandler
    	DCD  PVD_IRQHandler
    	DCD  TAMPER_IRQHandler
    	DCD  RTC_IRQHandler
    	DCD  FLASH_IRQHandler
    	DCD  RCC_IRQHandler
    	DCD  EXTI0_IRQHandler
    	DCD  EXTI1_IRQHandler
    	DCD  EXTI2_IRQHandler
    	DCD  EXTI3_IRQHandler
    	DCD  EXTI4_IRQHandler
    	DCD  DMAChannel1_IRQHandler
    	DCD  DMAChannel2_IRQHandler
    	DCD  DMAChannel3_IRQHandler
    	DCD  DMAChannel4_IRQHandler
    	DCD  DMAChannel5_IRQHandler
    	DCD  DMAChannel6_IRQHandler
    	DCD  DMAChannel7_IRQHandler
    	DCD  ADC_IRQHandler
    	DCD  USB_HP_CAN_TX_IRQHandler
    	DCD  USB_LP_CAN_RX0_IRQHandler
    	DCD  CAN_RX1_IRQHandler
    	DCD  CAN_SCE_IRQHandler
    	DCD  EXTI9_5_IRQHandler
    	DCD  TIM1_BRK_IRQHandler
    	DCD  TIM1_UP_IRQHandler
    	DCD  TIM1_TRG_COM_IRQHandler
    	DCD  TIM1_CC_IRQHandler
    	DCD  TIM2_IRQHandler
    	DCD  TIM3_IRQHandler
    	DCD  TIM4_IRQHandler
    	DCD  I2C1_EV_IRQHandler
    	DCD  I2C1_ER_IRQHandler
    	DCD  I2C2_EV_IRQHandler
    	DCD  I2C2_ER_IRQHandler
    	DCD  SPI1_IRQHandler
    	DCD  SPI2_IRQHandler
    	DCD  USART1_IRQHandler
    	DCD  USART2_IRQHandler
    	DCD  USART3_IRQHandler
    	DCD  EXTI15_10_IRQHandler
    	DCD  RTCAlarm_IRQHandler
    	DCD  USBWakeUp_IRQHandler 

		DCD     TIM8_BRK_IRQHandler       ; TIM8 Break
		DCD     TIM8_UP_IRQHandler        ; TIM8 Update
		DCD     TIM8_TRG_COM_IRQHandler   ; TIM8 Trigger and Commutation
		DCD     TIM8_CC_IRQHandler        ; TIM8 Capture Compare
		DCD     ADC3_IRQHandler           ; ADC3
		DCD     FSMC_IRQHandler           ; FSMC
		DCD     SDIO_IRQHandler           ; SDIO
		DCD     TIM5_IRQHandler           ; TIM5
		DCD     SPI3_IRQHandler           ; SPI3
		DCD     UART4_IRQHandler          ; UART4
		DCD     UART5_IRQHandler          ; UART5
		DCD     TIM6_IRQHandler           ; TIM6
		DCD     TIM7_IRQHandler           ; TIM7
		DCD     DMA2_Channel1_IRQHandler  ; DMA2 Channel1
		DCD     DMA2_Channel2_IRQHandler  ; DMA2 Channel2
		DCD     DMA2_Channel3_IRQHandler  ; DMA2 Channel3
		DCD     DMA2_Channel4_5_IRQHandler ; DMA2 Channel4 & Channel5

;******************************************************************************************
;*  Reset entry
;******************************************************************************************
        EXPORT  Reset_Handler
Reset_Handler
        IMPORT  __main                
		IMPORT  SystemInit
		LDR     R0, =SystemInit
		BLX     R0       
        LDR     R0, =__main
        BX      R0


;******************************************************************************************
;*  NMI exception handler. 
;*  It simply enters an infinite loop.
;******************************************************************************************
NMIException
        B       NMIException


;******************************************************************************************
;*  Fault interrupt handler. 
;*  It simply enters an infinite loop.
;******************************************************************************************
HardFaultException
        B       HardFaultException

;******************************************************************************************
;*  MemManage interrupt handler. 
;*  It simply enters an infinite loop.
;******************************************************************************************
MemManageException
        B       MemManageException

;******************************************************************************************
;*  Bus Fault interrupt handler. 
;*  It simply enters an infinite loop.
;******************************************************************************************
BusFaultException
        B       BusFaultException

;******************************************************************************************
;*  UsageFault interrupt handler. 
;*  It simply enters an infinite loop.
;******************************************************************************************
UsageFaultException
        B       UsageFaultException

;******************************************************************************************
;*  DebugMonitor interrupt handler. 
;*  It simply enters an infinite loop.
;******************************************************************************************
DebugMonitor
        B       DebugMonitor

;******************************************************************************************
;*  SVCall interrupt handler. 
;*  It simply enters an infinite loop.
;******************************************************************************************
SVCHandler
        B       SVCHandler



;*******************************************************************************************
;*  Make sure the end of this section is aligned.
;*******************************************************************************************
        ALIGN


;********************************************************************************************
;*  Code section for initializing the heap and stack                                                                                                          
;********************************************************************************************
		AREA    |.text|, CODE, READONLY


;********************************************************************************************
;*  The function expected of the C library startup 
;*  code for defining the stack and heap memory locations. 
;********************************************************************************************
        IMPORT  __use_two_region_memory
        EXPORT  __user_initial_stackheap 
__user_initial_stackheap
        LDR     R0, =Heap
        LDR     R1, =(Stack + Stack_Size)
        LDR     R2, =(Heap + Heap_Size)
        LDR     R3, =Stack
        BX      LR

;******************************************************************************************
;*  Make sure the end of this section is aligned.
;******************************************************************************************
        ALIGN


;*******************************************************************************************
;*  End Of File                                                     
;*******************************************************************************************
        END


ELF文件信息

========================================================================

** ELF Header Information

    File Name: F:\桌面\河北石家庄\20140115 - 优化交易时间\232_20140103\WER-M232-B100-20130510_V01\Obj\stm32f10x_startup.o

    Machine class: ELFCLASS32 (32-bit)
    Data encoding: ELFDATA2LSB (Little endian)
    Header version: EV_CURRENT (Current version)
    Operating System ABI: none
    ABI Version: 0
    File Type: ET_REL (Relocatable object) (1)
    Machine: EM_ARM (ARM)

    Entry offset (in SHF_ENTRYSECT section): 0x00000000
    Flags: None (0x05000000)

    ARM ELF revision: 5 (ABI version 2)

    Built with
    ARM Assembler, 5.03 [Build 76]

    Header size: 52 bytes (0x34)
    Program header entry size: 0 bytes (0x0)
    Section header entry size: 40 bytes (0x28)

    Program header entries: 0
    Section header entries: 22

    Program header offset: 0 (0x00000000)
    Section header offset: 5344 (0x000014e0)

    Section header string table index: 21

========================================================================

** Section #1 ‘STACK‘ (SHT_NOBITS) [SHF_ALLOC + SHF_WRITE]
    Size   : 1024 bytes (alignment 8)
    Address: 0x00000000


** Section #2 ‘HEAP‘ (SHT_NOBITS) [SHF_ALLOC + SHF_WRITE]
    Size   : 512 bytes (alignment 8)
    Address: 0x00000000


** Section #3 ‘RESET‘ (SHT_PROGBITS) [SHF_ALLOC + SHF_EXECINSTR]
    Size   : 336 bytes (alignment 4)
    Address: 0x00000000


** Section #4 ‘.relRESET‘ (SHT_REL)
    Size   : 584 bytes (alignment 4)
    Symbol table #17 ‘.symtab‘
    73 relocations applied to section #3 ‘RESET‘


** Section #5 ‘.text‘ (SHT_PROGBITS) [SHF_ALLOC + SHF_EXECINSTR]
    Size   : 28 bytes (alignment 4)
    Address: 0x00000000


** Section #6 ‘.rel.text‘ (SHT_REL)
    Size   : 32 bytes (alignment 4)
    Symbol table #17 ‘.symtab‘
    4 relocations applied to section #5 ‘.text‘


** Section #7 ‘.debug_info‘ (SHT_PROGBITS)
    Size   : 176 bytes


** Section #8 ‘.rel.debug_info‘ (SHT_REL)
    Size   : 32 bytes (alignment 4)
    Symbol table #17 ‘.symtab‘
    4 relocations applied to section #7 ‘.debug_info‘


** Section #9 ‘.debug_line‘ (SHT_PROGBITS)
    Size   : 108 bytes


** Section #10 ‘.rel.debug_line‘ (SHT_REL)
    Size   : 8 bytes (alignment 4)
    Symbol table #17 ‘.symtab‘
    1 relocations applied to section #9 ‘.debug_line‘


** Section #11 ‘.debug_info‘ (SHT_PROGBITS)
    Size   : 176 bytes


** Section #12 ‘.rel.debug_info‘ (SHT_REL)
    Size   : 32 bytes (alignment 4)
    Symbol table #17 ‘.symtab‘
    4 relocations applied to section #11 ‘.debug_info‘


** Section #13 ‘.debug_line‘ (SHT_PROGBITS)
    Size   : 88 bytes


** Section #14 ‘.rel.debug_line‘ (SHT_REL)
    Size   : 8 bytes (alignment 4)
    Symbol table #17 ‘.symtab‘
    1 relocations applied to section #13 ‘.debug_line‘


** Section #15 ‘__ARM_asm.debug_abbrev.1‘ (SHT_GROUP)
    Size   : 8 bytes (alignment 4)
    Symbol table #17 ‘.symtab‘


** Section #16 ‘.debug_abbrev‘ (SHT_PROGBITS) [SHF_GROUP]
    Size   : 32 bytes


** Section #17 ‘.symtab‘ (SHT_SYMTAB)
    Size   : 1520 bytes (alignment 4)
    String table #18 ‘.strtab‘
    Last local symbol no. 25


** Section #18 ‘.strtab‘ (SHT_STRTAB)
    Size   : 1611 bytes


** Section #19 ‘.comment‘ (SHT_PROGBITS)
    Size   : 296 bytes


** Section #20 ‘.ARM.attributes‘ (SHT_ARM_ATTRIBUTES)
    Size   : 62 bytes


** Section #21 ‘.shstrtab‘ (SHT_STRTAB)
    Size   : 154 bytes

反汇编结果:
========================================================================

** ELF Header Information

    File Name: F:\桌面\河北石家庄\20140115 - 优化交易时间\232_20140103\WER-M232-B100-20130510_V01\Obj\stm32f10x_startup.o

    Machine class: ELFCLASS32 (32-bit)
    Data encoding: ELFDATA2LSB (Little endian)
    Header version: EV_CURRENT (Current version)
    Operating System ABI: none
    ABI Version: 0
    File Type: ET_REL (Relocatable object) (1)
    Machine: EM_ARM (ARM)

    Entry offset (in SHF_ENTRYSECT section): 0x00000000
    Flags: None (0x05000000)

    ARM ELF revision: 5 (ABI version 2)

    Built with
    ARM Assembler, 5.03 [Build 76]

    Header size: 52 bytes (0x34)
    Program header entry size: 0 bytes (0x0)
    Section header entry size: 40 bytes (0x28)

    Program header entries: 0
    Section header entries: 22

    Program header offset: 0 (0x00000000)
    Section header offset: 5344 (0x000014e0)

    Section header string table index: 21

========================================================================

** Section #1 ‘STACK‘ (SHT_NOBITS) [SHF_ALLOC + SHF_WRITE]
    Size   : 1024 bytes (alignment 8)
    Address: 0x00000000


** Section #2 ‘HEAP‘ (SHT_NOBITS) [SHF_ALLOC + SHF_WRITE]
    Size   : 512 bytes (alignment 8)
    Address: 0x00000000


** Section #3 ‘RESET‘ (SHT_PROGBITS) [SHF_ALLOC + SHF_EXECINSTR]
    Size   : 336 bytes (alignment 4)
    Address: 0x00000000

    $d
    RESET
    __Vectors
        0x00000000:    00000400    ....    DCD    1024 ; Stack
        0x00000004:    00000000    ....    DCD    0 ; Reset_Handler
        0x00000008:    00000000    ....    DCD    0 ; NMIException
        0x0000000c:    00000000    ....    DCD    0 ; HardFaultException
        0x00000010:    00000000    ....    DCD    0 ; MemManageException
        0x00000014:    00000000    ....    DCD    0 ; BusFaultException
        0x00000018:    00000000    ....    DCD    0 ; UsageFaultException
        0x0000001c:    00000000    ....    DCD    0
        0x00000020:    00000000    ....    DCD    0
        0x00000024:    00000000    ....    DCD    0
        0x00000028:    00000000    ....    DCD    0
        0x0000002c:    00000000    ....    DCD    0 ; SVCHandler
        0x00000030:    00000000    ....    DCD    0 ; DebugMonitor
        0x00000034:    00000000    ....    DCD    0
        0x00000038:    00000000    ....    DCD    0 ; OSPendSV
        0x0000003c:    00000000    ....    DCD    0 ; SysTickHandler
        0x00000040:    00000000    ....    DCD    0 ; WWDG_IRQHandler
        0x00000044:    00000000    ....    DCD    0 ; PVD_IRQHandler
        0x00000048:    00000000    ....    DCD    0 ; TAMPER_IRQHandler
        0x0000004c:    00000000    ....    DCD    0 ; RTC_IRQHandler
        0x00000050:    00000000    ....    DCD    0 ; FLASH_IRQHandler
        0x00000054:    00000000    ....    DCD    0 ; RCC_IRQHandler
        0x00000058:    00000000    ....    DCD    0 ; EXTI0_IRQHandler
        0x0000005c:    00000000    ....    DCD    0 ; EXTI1_IRQHandler
        0x00000060:    00000000    ....    DCD    0 ; EXTI2_IRQHandler
        0x00000064:    00000000    ....    DCD    0 ; EXTI3_IRQHandler
        0x00000068:    00000000    ....    DCD    0 ; EXTI4_IRQHandler
        0x0000006c:    00000000    ....    DCD    0 ; DMAChannel1_IRQHandler
        0x00000070:    00000000    ....    DCD    0 ; DMAChannel2_IRQHandler
        0x00000074:    00000000    ....    DCD    0 ; DMAChannel3_IRQHandler
        0x00000078:    00000000    ....    DCD    0 ; DMAChannel4_IRQHandler
        0x0000007c:    00000000    ....    DCD    0 ; DMAChannel5_IRQHandler
        0x00000080:    00000000    ....    DCD    0 ; DMAChannel6_IRQHandler
        0x00000084:    00000000    ....    DCD    0 ; DMAChannel7_IRQHandler
        0x00000088:    00000000    ....    DCD    0 ; ADC_IRQHandler
        0x0000008c:    00000000    ....    DCD    0 ; USB_HP_CAN_TX_IRQHandler
        0x00000090:    00000000    ....    DCD    0 ; USB_LP_CAN_RX0_IRQHandler
        0x00000094:    00000000    ....    DCD    0 ; CAN_RX1_IRQHandler
        0x00000098:    00000000    ....    DCD    0 ; CAN_SCE_IRQHandler
        0x0000009c:    00000000    ....    DCD    0 ; EXTI9_5_IRQHandler
        0x000000a0:    00000000    ....    DCD    0 ; TIM1_BRK_IRQHandler
        0x000000a4:    00000000    ....    DCD    0 ; TIM1_UP_IRQHandler
        0x000000a8:    00000000    ....    DCD    0 ; TIM1_TRG_COM_IRQHandler
        0x000000ac:    00000000    ....    DCD    0 ; TIM1_CC_IRQHandler
        0x000000b0:    00000000    ....    DCD    0 ; TIM2_IRQHandler
        0x000000b4:    00000000    ....    DCD    0 ; TIM3_IRQHandler
        0x000000b8:    00000000    ....    DCD    0 ; TIM4_IRQHandler
        0x000000bc:    00000000    ....    DCD    0 ; I2C1_EV_IRQHandler
        0x000000c0:    00000000    ....    DCD    0 ; I2C1_ER_IRQHandler
        0x000000c4:    00000000    ....    DCD    0 ; I2C2_EV_IRQHandler
        0x000000c8:    00000000    ....    DCD    0 ; I2C2_ER_IRQHandler
        0x000000cc:    00000000    ....    DCD    0 ; SPI1_IRQHandler
        0x000000d0:    00000000    ....    DCD    0 ; SPI2_IRQHandler
        0x000000d4:    00000000    ....    DCD    0 ; USART1_IRQHandler
        0x000000d8:    00000000    ....    DCD    0 ; USART2_IRQHandler
        0x000000dc:    00000000    ....    DCD    0 ; USART3_IRQHandler
        0x000000e0:    00000000    ....    DCD    0 ; EXTI15_10_IRQHandler
        0x000000e4:    00000000    ....    DCD    0 ; RTCAlarm_IRQHandler
        0x000000e8:    00000000    ....    DCD    0 ; USBWakeUp_IRQHandler
        0x000000ec:    00000000    ....    DCD    0 ; TIM8_BRK_IRQHandler
        0x000000f0:    00000000    ....    DCD    0 ; TIM8_UP_IRQHandler
        0x000000f4:    00000000    ....    DCD    0 ; TIM8_TRG_COM_IRQHandler
        0x000000f8:    00000000    ....    DCD    0 ; TIM8_CC_IRQHandler
        0x000000fc:    00000000    ....    DCD    0 ; ADC3_IRQHandler
        0x00000100:    00000000    ....    DCD    0 ; FSMC_IRQHandler
        0x00000104:    00000000    ....    DCD    0 ; SDIO_IRQHandler
        0x00000108:    00000000    ....    DCD    0 ; TIM5_IRQHandler
        0x0000010c:    00000000    ....    DCD    0 ; SPI3_IRQHandler
        0x00000110:    00000000    ....    DCD    0 ; UART4_IRQHandler
        0x00000114:    00000000    ....    DCD    0 ; UART5_IRQHandler
        0x00000118:    00000000    ....    DCD    0 ; TIM6_IRQHandler
        0x0000011c:    00000000    ....    DCD    0 ; TIM7_IRQHandler
        0x00000120:    00000000    ....    DCD    0 ; DMA2_Channel1_IRQHandler
        0x00000124:    00000000    ....    DCD    0 ; DMA2_Channel2_IRQHandler
        0x00000128:    00000000    ....    DCD    0 ; DMA2_Channel3_IRQHandler
        0x0000012c:    00000000    ....    DCD    0 ; DMA2_Channel4_5_IRQHandler
    $t
    Reset_Handler
        0x00000130:    4805        .H      LDR      r0,[pc,#20] ; [SystemInit = 0x148] = 0
        0x00000132:    4780        .G      BLX      r0
        0x00000134:    4805        .H      LDR      r0,[pc,#20] ; [__main = 0x14c] = 0
        0x00000136:    4700        .G      BX       r0
    NMIException
        0x00000138:    e7fe        ..      B        NMIException ; 0x138
    HardFaultException
        0x0000013a:    e7fe        ..      B        HardFaultException ; 0x13a
    MemManageException
        0x0000013c:    e7fe        ..      B        MemManageException ; 0x13c
    BusFaultException
        0x0000013e:    e7fe        ..      B        BusFaultException ; 0x13e
    UsageFaultException
        0x00000140:    e7fe        ..      B        UsageFaultException ; 0x140
    DebugMonitor
        0x00000142:    e7fe        ..      B        DebugMonitor ; 0x142
    SVCHandler
        0x00000144:    e7fe        ..      B        SVCHandler ; 0x144
    $d
        0x00000146:    0000        ..      DCW    0
        0x00000148:    00000000    ....    DCD    0 ; SystemInit
        0x0000014c:    00000000    ....    DCD    0 ; __main

** Section #4 ‘.relRESET‘ (SHT_REL)
    Size   : 584 bytes (alignment 4)
    Symbol table #17 ‘.symtab‘
    73 relocations applied to section #3 ‘RESET‘


** Section #5 ‘.text‘ (SHT_PROGBITS) [SHF_ALLOC + SHF_EXECINSTR]
    Size   : 28 bytes (alignment 4)
    Address: 0x00000000

    $t
    .text
    __user_initial_stackheap
        0x00000000:    4802        .H      LDR      r0,[pc,#8] ; [Heap = 0xc] = 0
        0x00000002:    4903        .I      LDR      r1,[pc,#12] ; [(Stack + 1024) = 0x10] = 0x400
        0x00000004:    4a03        .J      LDR      r2,[pc,#12] ; [(Heap + 512) = 0x14] = 0x200
        0x00000006:    4b04        .K      LDR      r3,[pc,#16] ; [Stack = 0x18] = 0
        0x00000008:    4770        pG      BX       lr
    $d
        0x0000000a:    0000        ..      DCW    0
        0x0000000c:    00000000    ....    DCD    0 ; Heap
        0x00000010:    00000400    ....    DCD    1024 ; Stack
        0x00000014:    00000200    ....    DCD    512 ; Heap
        0x00000018:    00000000    ....    DCD    0 ; Stack

** Section #6 ‘.rel.text‘ (SHT_REL)
    Size   : 32 bytes (alignment 4)
    Symbol table #17 ‘.symtab‘
    4 relocations applied to section #5 ‘.text‘


** Section #7 ‘.debug_info‘ (SHT_PROGBITS)
    Size   : 176 bytes


** Section #8 ‘.rel.debug_info‘ (SHT_REL)
    Size   : 32 bytes (alignment 4)
    Symbol table #17 ‘.symtab‘
    4 relocations applied to section #7 ‘.debug_info‘


** Section #9 ‘.debug_line‘ (SHT_PROGBITS)
    Size   : 108 bytes


** Section #10 ‘.rel.debug_line‘ (SHT_REL)
    Size   : 8 bytes (alignment 4)
    Symbol table #17 ‘.symtab‘
    1 relocations applied to section #9 ‘.debug_line‘


** Section #11 ‘.debug_info‘ (SHT_PROGBITS)
    Size   : 176 bytes


** Section #12 ‘.rel.debug_info‘ (SHT_REL)
    Size   : 32 bytes (alignment 4)
    Symbol table #17 ‘.symtab‘
    4 relocations applied to section #11 ‘.debug_info‘


** Section #13 ‘.debug_line‘ (SHT_PROGBITS)
    Size   : 88 bytes


** Section #14 ‘.rel.debug_line‘ (SHT_REL)
    Size   : 8 bytes (alignment 4)
    Symbol table #17 ‘.symtab‘
    1 relocations applied to section #13 ‘.debug_line‘


** Section #15 ‘__ARM_asm.debug_abbrev.1‘ (SHT_GROUP)
    Size   : 8 bytes (alignment 4)
    Symbol table #17 ‘.symtab‘


** Section #16 ‘.debug_abbrev‘ (SHT_PROGBITS) [SHF_GROUP]
    Size   : 32 bytes


** Section #17 ‘.symtab‘ (SHT_SYMTAB)
    Size   : 1520 bytes (alignment 4)
    String table #18 ‘.strtab‘
    Last local symbol no. 25


** Section #18 ‘.strtab‘ (SHT_STRTAB)
    Size   : 1611 bytes


** Section #19 ‘.comment‘ (SHT_PROGBITS)
    Size   : 296 bytes


** Section #20 ‘.ARM.attributes‘ (SHT_ARM_ATTRIBUTES)
    Size   : 62 bytes


** Section #21 ‘.shstrtab‘ (SHT_STRTAB)
    Size   : 154 bytes







原文:http://blog.csdn.net/inurlcn/article/details/19916639

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!