[llvm] r270569 - Recommit r270070 ([llvm-mc] - Teach llvm-mc to generate compressed debug sections in zlib style.)

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Wed May 25 04:04:32 PDT 2016

>This breaks linking on Linux with -Wa,--compress-debug-sections (it causes errors with GNU ld and crashes Gold). Reverted in r270638. Sorry :( Maybe this could be brought back behind a flag?

>Testcase (using attached x.c):
>$ clang -Wa,--compress-debug-sections x.c -c -o x.o -g
>$ ld x.o -o x
>ld: x.o(.debug_info+0x85): reloc against `.debug_str': error 2
>$ gold x.o -o x
>gold: warning: x.o: last entry in mergeable string section '.debug_gdb_scripts' not null terminated
>gold: internal error in read_header_prolog, at ../../gold/dwarf_reader.cc:1618
>$ ld --version
>GNU ld (GNU Binutils for Ubuntu) 2.24
>$ gold --version
>GNU gold (GNU Binutils for Ubuntu 2.24) 1.11

+ Rafael, Davide

Hello Richard,
thanks for testcase and sorry for breakage. Just retested with my newer binutils and
its works for me:

++ ld x.o -o x
++ ld --version
GNU ld (GNU Binutils for Ubuntu) 2.26?
++ gold x.o -o x
++ gold --version
GNU gold (GNU Binutils for Ubuntu 2.26) 1.11

So looks nothing wrong with implementation itself, but probably we really should hide that behind the flag.
Rafael, Davide, what do you think ?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160525/b0403fb1/attachment.html>

More information about the llvm-commits mailing list