<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:i@maskray.me" title="Fangrui Song <i@maskray.me>"> <span class="fn">Fangrui Song</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WORKSFORME - Copy relocation against protected symbol doesn't work"
href="https://bugs.llvm.org/show_bug.cgi?id=26580">bug 26580</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;">Resolution</td>
<td>---
</td>
<td>WORKSFORME
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>i@maskray.me
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WORKSFORME - Copy relocation against protected symbol doesn't work"
href="https://bugs.llvm.org/show_bug.cgi?id=26580#c22">Comment # 22</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WORKSFORME - Copy relocation against protected symbol doesn't work"
href="https://bugs.llvm.org/show_bug.cgi?id=26580">bug 26580</a>
from <span class="vcard"><a class="email" href="mailto:i@maskray.me" title="Fangrui Song <i@maskray.me>"> <span class="fn">Fangrui Song</span></a>
</span></b>
<pre>The original issue is "Copy relocation against protected symbol doesn't work".
I agree with Rich Felker (<a href="https://gcc.gnu.org/ml/gcc/2016-04/msg00168.html">https://gcc.gnu.org/ml/gcc/2016-04/msg00168.html</a>) and
Cary Coutant (<a href="https://sourceware.org/ml/binutils/2016-03/msg00407.html">https://sourceware.org/ml/binutils/2016-03/msg00407.html</a>
<a href="https://gcc.gnu.org/ml/gcc/2016-04/msg00158.html">https://gcc.gnu.org/ml/gcc/2016-04/msg00158.html</a>
<a href="https://gcc.gnu.org/ml/gcc/2016-04/msg00169.html">https://gcc.gnu.org/ml/gcc/2016-04/msg00169.html</a>) that we should
keep using direct access against protected symbols and disallow copy
relocations against protected symbols.
I appreciate that Cary Coutant and Rafael Ávila de Espíndola added diagnostics
to gold and lld, respectively:
gold (<a href="https://sourceware.org/bugzilla/show_bug.cgi?id=19823">https://sourceware.org/bugzilla/show_bug.cgi?id=19823</a>)
lld (<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - LLD failed to link symbols with "protected" visibility"
href="show_bug.cgi?id=31476">https://bugs.llvm.org/show_bug.cgi?id=31476</a>)
And I hope the following resolutions could be reworked:
GCC 5 x86-64 (<a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248</a>)
i386 was flagged as a reproduce
(<a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55012">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55012</a>)
__attribute__((visibility("protected"))) int a;
int foo() { return a; } // GCC>=5 uses R_X86_64_GOTPCREL/R_X86_64_REX_GOTPCRELX
instead of R_X86_64_PC32
binutils 2.26: R_X86_64_PC32 can no longer be used against a protected symbol
<a href="https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=ca3fe95e469b9daec153caa2c90665f5daaec2b5">https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=ca3fe95e469b9daec153caa2c90665f5daaec2b5</a></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>