[llvm-bugs] [Bug 33289] New: lld -r does not correctly handle mixed compressed and uncompressed debug info

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jun 2 15:28:51 PDT 2017


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

            Bug ID: 33289
           Summary: lld -r does not correctly handle mixed compressed and
                    uncompressed debug info
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: smeenai at fb.com
                CC: compnerd at compnerd.org, grimar at accesssoftek.com,
                    llvm-bugs at lists.llvm.org, rafael.espindola at gmail.com,
                    ruiu at google.com

% cat a.c
int a() { return 0; }

% cat b.c
int b() { return 0; }

% gcc -g -c a.c
% gcc -g -Wa,--compress-debug-sections -c b.c
% ld.lld -r -o c.o a.o b.o
% objdump -j .zdebug_str -s c.o

c.o:     file format elf64-x86-64

Contents of section .zdebug_str:
 0000 2f746d70 00474e55 20432034 2e382e35  /tmp.GNU C 4.8.5
 0010 20323031 35303632 33202852 65642048   20150623 (Red H
 0020 61742034 2e382e35 2d313129 202d6d74  at 4.8.5-11) -mt
 0030 756e653d 67656e65 72696320 2d6d6172  une=generic -mar
 0040 63683d78 38362d36 34202d67 00        ch=x86-64 -g.

lld creates .zdebug_str, etc, but the section is actually uncompressed, which
causes issues down the line when you attempt to link that object file into
something. Both ld.bfd and ld.gold handle this correctly; the output object
file doesn't have any compressed debug info sections.

-- 
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/20170602/8b1d918d/attachment.html>


More information about the llvm-bugs mailing list