[llvm-bugs] [Bug 39995] New: llvm-nm should print section names for section symbols

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Dec 13 06:06:29 PST 2018


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

            Bug ID: 39995
           Summary: llvm-nm should print section names for section symbols
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: llvm-nm
          Assignee: unassignedbugs at nondot.org
          Reporter: jh7370.2008 at my.bristol.ac.uk
                CC: llvm-bugs at lists.llvm.org

GNU nm displays the section name in the place of a symbol name for section
symbols when dumping with the --debug-syms switch. It would make sense if we
did a similar thing in llvm-nm, as it makes the output more readable.

Example input:
int bar;

int main(){
    return bar;
}

Compiled with:
C:\llvm\build\Debug\bin\clang.exe --target=x86_64-pc-linux -c bar.cpp -g

GNU nm:
nm -a bar.o
0000000000000000 N .debug_abbrev
0000000000000000 N .debug_line
0000000000000000 N .debug_str
0000000000000000 t .text
0000000000000000 B bar
0000000000000000 a bar.cpp
0000000000000000 T main

llvm-nm:
                 U
0000000000000000 t
0000000000000000 ?
0000000000000000 ?
0000000000000000 ?
0000000000000000 B bar
0000000000000000 a bar.cpp
0000000000000000 T main

I'm guessing that this would also fix the '?' which should be 'N' for the
.debug* section symbols. If not, a new bug should be filed.

-- 
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/20181213/c3ffdf13/attachment.html>


More information about the llvm-bugs mailing list