<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 INVALID - Specifying -Ttext <altaddr> leaves data loaded at default text load address"
href="https://bugs.llvm.org/show_bug.cgi?id=46110">bug 46110</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>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>i@maskray.me
</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 - Specifying -Ttext <altaddr> leaves data loaded at default text load address"
href="https://bugs.llvm.org/show_bug.cgi?id=46110#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Specifying -Ttext <altaddr> leaves data loaded at default text load address"
href="https://bugs.llvm.org/show_bug.cgi?id=46110">bug 46110</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>Many people use -Ttext=$base to specify the image base. This works for GNU ld
with -z noseparate-code but not with -z separate-code.
LLD has defaulted to a R/RX/RW/RW layout for a long time (unless
--no-rosegment). -Ttext can only change the address of a section named ".text"
in the RX segment (often referred to as the "text segment"). For the reason of
mismatching expectation, I wrote "-Ttext=$base (base is usually 0) is no longer
supported. If PT_PHDR is needed, use --image-base=$base instead."
I agree that the -Ttext= is probably less useful than -Ttext-segment= and the
latter is usually what people should use. The functionality of -Ttext= is still
available, so I don't see a strong reason removing it (it can lead to confusion
- but removing it will also cause feature requests "support -Ttext=" => I think
we have to accept the status quo).
<span class="quote">> I have built Valgrind successfully with lld versions 10 and 11 by using the --image-base=$base.</span >
Thanks for doing that. If possible, please upstream the patch to the upstream.
Feel free to CC me if needed.</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>