<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:rafael.espindola@gmail.com" title="Rafael Ávila de Espíndola <rafael.espindola@gmail.com>"> <span class="fn">Rafael Ávila de Espíndola</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - LLVM can emit hidden undefined weak symbols which trip up Gold"
href="http://llvm.org/bugs/show_bug.cgi?id=15919">bug 15919</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>ASSIGNED
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>INVALID
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - LLVM can emit hidden undefined weak symbols which trip up Gold"
href="http://llvm.org/bugs/show_bug.cgi?id=15919#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - LLVM can emit hidden undefined weak symbols which trip up Gold"
href="http://llvm.org/bugs/show_bug.cgi?id=15919">bug 15919</a>
from <span class="vcard"><a class="email" href="mailto:rafael.espindola@gmail.com" title="Rafael Ávila de Espíndola <rafael.espindola@gmail.com>"> <span class="fn">Rafael Ávila de Espíndola</span></a>
</span></b>
<pre>It does look like a gold issue. It reproduces with no plugin at all:
$ cat test.s
.file "test.bc"
.text
.globl f
.align 16, 0x90
.type f,@function
f: # @f
.cfi_startproc
# BB#0:
pushq %rax
.Ltmp1:
.cfi_def_cfa_offset 16
callq _stdio_init
popq %rax
ret
.Ltmp2:
.size f, .Ltmp2-f
.cfi_endproc
.hidden _stdio_init
.weak _stdio_init
.section ".note.GNU-stack","",@progbits
Trying to link that into a shared library causes an error:
test.o: requires dynamic R_X86_64_PC32 reloc against '_stdio_init' which may
overflow at runtime; recompile with -fPIC
error: hidden symbol '_stdio_init' is not defined locally
The same link link line with the bfd linker works and produces a call to
address 0 since the weak symbol is undefined.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>