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

            Bug ID: 41437
           Summary: llvm-nm does not understand gcc -flto symbols
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: llvm-nm
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

As pointed out yesterday, llvm-nm is unable to understand symbols built with
gcc+lto:

$ echo "int xyz;" > /tmp/test.c
$ gcc -flto -c /tmp/test.c -o /tmp/test.o
$ nm /tmp/test.o
00000000 C xyz
$ llvm-nm /tmp/test.o
0000000000000001 C __gnu_lto_slim
0000000000000001 C __gnu_lto_v1

This is also annoying since GNU nm equally cannot clang+lto output, so there is
no single nm tool that can be used universally. A separate bug (filed in gnu
bugzilla perhaps) would be to add support to GNU nm for clang+lto symbols.
(Perhaps it's already there -- my local nm is still on 2.30)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to