<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 WONTFIX - .init section incorrectly filled (padded) with int3 instructions"
href="https://bugs.llvm.org/show_bug.cgi?id=46364">bug 46364</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>REOPENED
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>WONTFIX
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WONTFIX - .init section incorrectly filled (padded) with int3 instructions"
href="https://bugs.llvm.org/show_bug.cgi?id=46364#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WONTFIX - .init section incorrectly filled (padded) with int3 instructions"
href="https://bugs.llvm.org/show_bug.cgi?id=46364">bug 46364</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>% cat a.sh
echo '.section .init,"ax"; .balign 4; ret' > a.s
cc -c a.s
ld.bfd a.o a.o
GNU ld pads the gap with a NOP which may take several forms (90, 66 90, 0f 1f
00, etc):
401000: c3 ret
401001: 0f 1f 00 nop DWORD PTR [rax]
401004: c3 ret
while LLD pads the gap with a sequence of 0xcc.
.init/.fini/.ctors/.dtors/DT_INIT/DT_FINI have been obsoleted for many years.
The replacement .init_array/.fini_array/DT_INIT_ARRAY/DT_FINI_ARRAY have great
support (<a href="https://github.com/dlang/dmd/pull/10562">https://github.com/dlang/dmd/pull/10562</a> ). libc implementations of
some newer ABIs (aarch64,riscv) don't even support .init/.fini at all. Many
modern glibc configurations don't even run DT_INIT. Working around the
incorrect sh_addralign has very little value and is in contrary with the spirit
of the trap gap patch.</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>