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

            Bug ID: 45243
           Summary: llvm-objcopy produces corrupted .debug_str for
                    elf32-x86-64 (X32 ABI) emulation (Z_DATA_ERROR)
           Product: tools
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: llvm-objcopy/strip
          Assignee: unassignedb...@nondot.org
          Reporter: ndesaulni...@google.com
                CC: alexander.v.shaposhni...@gmail.com,
                    jake.h.ehrl...@gmail.com,
                    jh7370.2...@my.bristol.ac.uk,
                    llvm-bugs@lists.llvm.org, mask...@google.com,
                    ruppre...@google.com, srhi...@google.com
            Blocks: 4068

via: https://github.com/ClangBuiltLinux/linux/issues/514

$ wget
https://github.com/ClangBuiltLinux/linux/files/4351404/cbl-514-out.x86_64.tar.gz
$ gunzip cbl-514-out.x86_64.tar.gz
$ tar xf cbl-514-out.x86_64.tar
$ cd out.x86_64
$ llvm-objcopy -O elf32-x86-64 arch/x86/entry/vdso/vgetcpu.o foo.o
$ llvm-dwarfdump foo.o
error: failed to decompress '.debug_loc', zlib error: Z_DATA_ERROR
error: failed to decompress '.debug_abbrev', zlib error: Z_DATA_ERROR
error: failed to decompress '.debug_info', zlib error: Z_DATA_ERROR
error: failed to decompress '.debug_str', zlib error: Z_DATA_ERROR
error: failed to decompress '.debug_line', zlib error: Z_DATA_ERROR
...
$ objcopy -O elf32-x86-64 arch/x86/entry/vdso/vgetcpu.o foo.o
$ llvm-dwarfdump foo.o
(different issues)

It seems the compressed debug info is corrupted; lld chokes on this eventually
when passed these objects, but looks like the error actually comes from
llvm-objcopy.


Referenced Bugs:

https://bugs.llvm.org/show_bug.cgi?id=4068
[Bug 4068] [Meta] Compiling the Linux kernel with clang
-- 
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