<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=koi8-r">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><span style="color: rgb(33, 33, 33); font-size: 12pt;">>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?</span><br>
</p>
<div style="color: rgb(33, 33, 33);">
<div>
<div dir="ltr">
<div>
<div>> </div>
<div>>Testcase (using attached x.c):</div>
<div>> </div>
<div>>$ clang -Wa,--compress-debug-sections x.c -c -o x.o -g<br>
</div>
<div>>$ ld x.o -o x                                                            </div>
<div>>ld: x.o(.debug_info+0x85): reloc against `.debug_str': error 2</div>
<div>
<div>>$ gold x.o -o x                                                            </div>
<div>>gold: warning: x.o: last entry in mergeable string section '.debug_gdb_scripts' not null terminated</div>
<div>>gold: internal error in read_header_prolog, at ../../gold/dwarf_reader.cc:1618</div>
</div>
</div>
<div>>$ ld --version</div>
<div>
<div>>GNU ld (GNU Binutils for Ubuntu) 2.24</div>
</div>
<div>>[...]</div>
<div>>$ gold --version</div>
<div>
<div>>GNU gold (GNU Binutils for Ubuntu 2.24) 1.11</div>
</div>
<div>>[...]</div>
</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">+ Rafael, Davide<br>
</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Hello Richard,<br>
</div>
<div class="gmail_extra">thanks for testcase and sorry for breakage. Just retested with my newer binutils and<br>
</div>
<div class="gmail_extra">its works for me:<br>
</div>
<div class="gmail_extra"><br>
<div>++ ld x.o -o x</div>
<div>++ ld --version</div>
<div>GNU ld (GNU Binutils for Ubuntu) 2.26​<br>
</div>
<div>...<br>
</div>
<div>++ gold x.o -o x</div>
<div>++ gold --version</div>
<div>GNU gold (GNU Binutils for Ubuntu 2.26) 1.11</div>
<div>...<br>
</div>
<div><br>
</div>
<div>So looks nothing wrong with implementation itself, but probably we really should hide that behind the flag.<br>
</div>
<div>Rafael, Davide, what do you think ?<br>
</div>
<div><br>
</div>
<div>George.<br>
</div>
<br>
</div>
</div>
</div>
</body>
</html>