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

Compiler V6.16 DW_AT_ranges attribute values appears to be wrong

Hello All,

I have an AXF file, built with Compiler 6.16.

It is very simple example, not much bugger than a 'hello world' but, I cannot get a sensible range list for the second compilation unit.

It has 3 ranges (DW_AT_ranges) referenced in .debug_info:

000022: DW_AT_ranges 0x0
000219: DW_AT_ranges 0x68
000f07: DW_AT_ranges 0x90

They are each in a DW_TAG_compile_unit and are accompanied by a DW_AT_low_pc (value 0) and no DW_AT_high_pc.

It has the following ranges defined in .debug_ranges:

** Section #66 '.debug_ranges' (SHT_PROGBITS)
Size : 168 bytes

0x000000 [0x100060e0 : 0x100060e4]
0x000008 [0x10006104 : 0x10006110]
0x000010 [0x100060fc : 0x10006100]
0x000018 [0x100060e4 : 0x100060e8]
0x000020 [0x100060f8 : 0x100060fc]
0x000028 [0x100060d8 : 0x100060dc]
0x000030 [0x100061d0 : 0x100061d4]
0x000038 [0x10006110 : 0x10006114]
0x000040 [0x100060dc : 0x100060e0]
0x000048 [0x10006100 : 0x10006104]
0x000050 [0x10006114 : 0x10006118]
0x000058 [0x100060e8 : 0x100060f6]
0x000060 End List
0x000068 End List
0x000070 [0x10006118 : 0x100061d0]
0x000078 [0x100061f8 : 0x10006202]
0x000080 [0x100061d4 : 0x100061f6]
0x000088 End List
0x000090 [0x10006204 : 0x10006208]
0x000098 [0x10006208 : 0x10006268]
0x0000a0 End List

The .debug_ranges section looks wrong:

  • There are 3 DW_AT_ranges referenced from the debug information section,
  • There are 4 ranges defined in the debug ranges section,
  • The second DW_AT_ranges attribute references an empty range,
  • There is an unreferenced range list.

The ELF file header:

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_EXEC (Executable) (2)
Machine: EM_ARM (ARM)

Image Entry point: 0x00000000
Flags: EF_ARM_HASENTRY (0x80000002)

ARM ELF revision: 128 (unknown)

Conforms to Base float procedure-call standard

Built with
Component: ARM Compiler 6.16 Tool: armlink [5dfeaa00]

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

Program header entries: 59
Section header entries: 73

Program header offset: 52 (0x00000034)
Section header offset: 108068 (0x0001a624)

Section header string table index: 72

All of the above data was generated by the fromelf.exe utility.

Regards,

Mark.