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

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Wed May 25 06:13:32 PDT 2016


Sigh, testing with the branches in the binutils git looks like 2.26 is
the first one to support the standard format :-(

It does support it since the branch point, so any 2.26 should be good.
Ubuntu 16.04 is ok, 15.10 is not. Debian stable is not. Fedora 23 is
not :-(

As much as I hate to admit it, looks like we will have to support both
--compress-debug-sections=zlib-gnu and --compress-debug-sections.
Current gas defaults to standard format and only produces .zdebug ones
if given --compress-debug-sections=zlib-gnu, so we can probably do the
same.

Cheers,
Rafael

On 25 May 2016 at 07:04, George Rimar <grimar at accesssoftek.com> wrote:
>>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 ?
>
> George.
>


More information about the llvm-commits mailing list