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

            Bug ID: 40482
           Summary: lld creates bogus dwarf info
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: unassignedb...@nondot.org
          Reporter: m...@milianw.de
                CC: llvm-bugs@lists.llvm.org, peter.sm...@linaro.org

$ g++ --version
g++ (GCC) 8.2.1 20181127

$ ld --version
LLD 7.0.1 (compatible with GNU linkers)

$ gdb --version
GNU gdb (GDB) 8.2.1

I just tried to switch to ld.lld from ld.gold for performance reasons, but hit
a road block: Apparently the DWARF emitted into the final executable or library
is bogus and leads to issues when trying to load it then in consumers like gdb,
valgrind, bloaty, ...

Here are some examples from a single KDE projects (ki18n). Note that I was so
far not able to reproduce this in a simplified standalone example.

Reading symbols from bin/libKF5I18n.so...Dwarf Error: bad offset
(0xcc08000026980004) in compilation unit header (offset 0x6fbe2 + 6) [in module
/home/milian/projects/kf5/build-dbg/frameworks/ki18n/bin/libKF5I18n.so.5.54.0]

Reading symbols from ktranscript.so...Dwarf Error: wrong version in compilation
unit header (is 422, should be 2, 3, 4 or 5) [in module
/home/milian/projects/kf5/build-dbg/frameworks/ki18n/bin/ktranscript.so]

Reading symbols from ki18n-ktranscripttest...Dwarf Error: wrong version in
compilation unit header (is 1024, should be 2, 3, 4 or 5) [in module
/home/milian/projects/kf5/build-dbg/frameworks/ki18n/bin/ki18n-ktranscripttest]

I have seen at least one more variation of the version header issue (version
514).

When I instead link with ld.gold, none of these issues show up.

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

Reply via email to