[LLVMbugs] [Bug 13347] New: llvm-dwarfdump doesn't do relocations

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jul 12 17:29:37 PDT 2012


             Bug #: 13347
           Summary: llvm-dwarfdump doesn't do relocations
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: paul.robinson at am.sony.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

llvm-dwarfdump doesn't understand ELF relocations. This is a problem for .o
files on non-Darwin platforms. It's most obvious when looking at the
dump of the .debug_info section, because all strings are now indirect,
and the lack of relocations means they all point to the Clang version string
(because it's the first thing in the .debug_str section).

I remember this coming up on the dev list before, but I just ran into
it again and couldn't find a bug, so here you are.

This is from an object I built on my Ubuntu x86-64 workstation, you can
see the problem. I'll attach the object.

.debug_info contents:
0x00000000: Compile Unit: length = 0x00000049 version = 0x0002 abbr_offset =
0x0000 addr_size = 0x08 (next CU at 0x0000004d)

0x0000000b: DW_TAG_compile_unit [1] *
0x0000000c:   DW_AT_producer [DW_FORM_strp]    ( .debug_str[0x00000000] =
"clang version 3.2 (trunk 160143)")
0x00000010:   DW_AT_language [DW_FORM_data2]    (0x000c)
0x00000012:   DW_AT_name [DW_FORM_strp]    ( .debug_str[0x00000000] = "clang
version 3.2 (trunk 160143)")
0x00000016:   DW_AT_low_pc [DW_FORM_addr]    (0x0000000000000000)
0x0000001e:   DW_AT_stmt_list [DW_FORM_data4]    (0x00000000)
0x00000022:   DW_AT_comp_dir [DW_FORM_strp]    ( .debug_str[0x00000000] =
"clang version 3.2 (trunk 160143)")

0x00000026:   DW_TAG_subprogram [2]  
0x00000027:     DW_AT_name [DW_FORM_strp]    ( .debug_str[0x00000000] = "clang
version 3.2 (trunk 160143)")
0x0000002b:     DW_AT_decl_file [DW_FORM_data1]    (0x01)
0x0000002c:     DW_AT_decl_line [DW_FORM_data1]    (0x01)
0x0000002d:     DW_AT_type [DW_FORM_ref4]    (cu + 0x0045 => {0x00000045})
0x00000031:     DW_AT_external [DW_FORM_flag]    (0x01)
0x00000032:     DW_AT_low_pc [DW_FORM_addr]    (0x0000000000000000)
0x0000003a:     DW_AT_high_pc [DW_FORM_addr]    (0x0000000000000000)
0x00000042:     DW_AT_frame_base [DW_FORM_block1]    (<0x01> 57 )
0x00000044:     DW_AT_APPLE_omit_frame_ptr [DW_FORM_flag]    (0x01)

0x00000045:   DW_TAG_base_type [3]  
0x00000046:     DW_AT_name [DW_FORM_strp]    ( .debug_str[0x00000000] = "clang
version 3.2 (trunk 160143)")
0x0000004a:     DW_AT_encoding [DW_FORM_data1]    (0x05)
0x0000004b:     DW_AT_byte_size [DW_FORM_data1]    (0x04)

0x0000004c:   NULL

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list