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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
% 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._______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs