https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253942
Bug ID: 253942
Summary: clang -gz=zlib does not pass --compress-debug-sections
to linker
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: [email protected]
Reporter: [email protected]
-gz=zlib compiler flag should enable compressed debug sections. It works as
expected for object files, but does not pass the required flag to the linker to
have them compressed in the final library/binary.
Version:
FreeBSD clang version 11.0.1 ([email protected]:llvm/llvm-project.git
llvmorg-11.0.1-0-g43ff75f2c3fe)
Object file has the 'C' flag:
% cc -c -g -gz=zlib hello.c
% readelf -S hello.o | grep -A1 ' .debug_info'
[ 6] .debug_info PROGBITS 0000000000000000 000000c7
0000000000000055 0000000000000000 C 0 0 8
Linked binary does not have the 'C' flag:
% cc -g -gz=zlib hello.c -o hello
% readelf -S hello | grep -A1 ' .debug_info'
[28] .debug_info PROGBITS 0000000000000000 00001520
0000000000000a91 0000000000000000 0 0 1
% Using gcc, the linked binary does have 'C' flag:
% gcc10 -g -gz=zlib hello.c -o hello
% readelf -S hello | grep -A1 ' .debug_info'
[24] .debug_info PROGBITS 0000000000000000 0000150a
00000000000004de 0000000000000000 C 0 0 1
Using -v to see the command line, gcc is automatically adding
`-compress-debug-sections=zlib` to the linker invocation.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"