[llvm-bugs] [Bug 37470] New: DW_AT_name for DW_TAG_label removes one leading underscore from the symbol name

via llvm-bugs llvm-bugs at lists.llvm.org
Tue May 15 06:57:55 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37470

            Bug ID: 37470
           Summary: DW_AT_name for DW_TAG_label removes one leading
                    underscore from the symbol name
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: MC
          Assignee: unassignedbugs at nondot.org
          Reporter: dimitry at google.com
                CC: llvm-bugs at lists.llvm.org

This is kind of confusing because there is no way to say when it was removed.
Also I was trying to find if it should be removed and it does not seem there is
anything saying that.

Here is the resulted dwarf for bionic _exit.S file:

$ readelf -wai
out/soong/.intermediates/bionic/libc/libc_syscalls/android_arm_armv8-a_cortex-a73_core_static/obj/bionic/libc/arch-arm/syscalls/_exit.o
Contents of the .debug_info section:

  Compilation Unit @ offset 0x0:
   Length:        0x168 (32-bit)
   Version:       4
   Abbrev Offset: 0x0
   Pointer Size:  4
 <0><b>: Abbrev Number: 1 (DW_TAG_compile_unit)
    <c>   DW_AT_stmt_list   : 0x0
    <10>   DW_AT_low_pc      : 0x0
    <14>   DW_AT_high_pc     : 0x20
    <18>   DW_AT_name        : bionic/libc/arch-arm/syscalls/_exit.S
    <3e>   DW_AT_comp_dir    : /proc/self/cwd
    <4d>   DW_AT_producer    : Android (4679922 based on r326829) clang version
7.0.1 (https://android.googlesource.com/toolchain/clang
32fb8450f65708b63c9a35046b2d1ee775e08733)
(https://android.googlesource.com/toolchain/llvm
67f3e6a51d93777841e0fb6d07f71fdf343df239) (based on LLVM 7.0.1svn)
    <154>   DW_AT_language    : 32769   (MIPS assembler)
 <1><156>: Abbrev Number: 2 (DW_TAG_label)
    <157>   DW_AT_name        : exit
    <15c>   DW_AT_decl_file   : 0x1
    <160>   DW_AT_decl_line   : 0x14
    <164>   DW_AT_low_pc      : 0x0
    <168>   DW_AT_prototyped  : 0
 <2><169>: Abbrev Number: 3 (DW_TAG_unspecified_parameters)
 <2><16a>: Abbrev Number: 0
 <1><16b>: Abbrev Number: 0

Contents of the .debug_abbrev section:

  Number TAG (0x0)
   1      DW_TAG_compile_unit    [has children]
    DW_AT_stmt_list    DW_FORM_sec_offset
    DW_AT_low_pc       DW_FORM_addr
    DW_AT_high_pc      DW_FORM_addr
    DW_AT_name         DW_FORM_string
    DW_AT_comp_dir     DW_FORM_string
    DW_AT_producer     DW_FORM_string
    DW_AT_language     DW_FORM_data2
    DW_AT value: 0     DW_FORM value: 0
   2      DW_TAG_label    [has children]
    DW_AT_name         DW_FORM_string
    DW_AT_decl_file    DW_FORM_data4
    DW_AT_decl_line    DW_FORM_data4
    DW_AT_low_pc       DW_FORM_addr
    DW_AT_prototyped   DW_FORM_flag
    DW_AT value: 0     DW_FORM value: 0
   3      DW_TAG_unspecified_parameters    [no children]
    DW_AT value: 0     DW_FORM value: 0

The expected DW_AT_name here is "_exit" because this is the name used for the
exported symbol.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180515/ff55b308/attachment-0001.html>


More information about the llvm-bugs mailing list