This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to get name,type,address of global variable from AXF?

I want to get name,type,address of global variable from AXF(.AXF is the executable file of keil MDK),I have gotten variable name、address and  rough  type(eg:object represent variable),The question is how to get specific variable type(eg: int,char..), My development environment is keil MDK 5.36 (compiler version 5).

C:\Users\10004265\Desktop\RTC_no_debug_str\Project\MDK-ARM\obj>readelf -S YD_DEMO.axf
There are 16 section headers, starting at offset 0x4ebac:

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] ER_IROM1          PROGBITS        08000000 000034 0013c8 00  AX  0   0  4
  [ 2] RW_IRAM1          PROGBITS        20000000 0013fc 00004c 00  WA  0   0  4
  [ 3] RW_IRAM1          NOBITS          2000004c 001448 00042c 00  WA  0   0  8
  [ 4] .debug_abbrev     PROGBITS        00000000 001448 000584 00      0   0  1
  [ 5] .debug_frame      PROGBITS        00000000 0019cc 000978 00      0   0  1
  [ 6] .debug_info       PROGBITS        00000000 002344 008890 00      0   0  1
  [ 7] .debug_line       PROGBITS        00000000 00abd4 0028cc 00      0   0  1
  [ 8] .debug_loc        PROGBITS        00000000 00d4a0 000c24 00      0   0  1
  [ 9] .debug_macinfo    PROGBITS        00000000 00e0c4 03695c 00      0   0  1
  [10] .debug_pubnames   PROGBITS        00000000 044a20 0009aa 00      0   0  1
  [11] .symtab           SYMTAB          00000000 0453cc 001e00 10     12 285  4
  [12] .strtab           STRTAB          00000000 0471cc 001bf8 00      0   0  1
  [13] .note             NOTE            00000000 048dc4 00001c 00      0   0  4
  [14] .comment          PROGBITS        00000000 048de0 005d10 00      0   0  1
  [15] .shstrtab         STRTAB          00000000 04eaf0 00009c 00      0   0  1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)

Parents Reply Children
No data