<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW " title="NEW --- - gnutools on ARM force linking with '--dynamic-linker'" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24245&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=vkTH7DU8Ee69Hp2nRwNKZ1YmWyDG5Rw-HHR1HarWcZA&s=7F8F6XvwRQOdLvpZP6MlT3SqwRi90nMTlezW8nmQE8I&e=">24245</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>gnutools on ARM force linking with '--dynamic-linker'
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Driver
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>kjell.braden@cased.de
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>I'm trying to compile a loader and link it with gnu ld, and I'm trying to
get clang not to pass '--dynamic-linker'. However,
lib/Driver/Tools.cpp:8075 will always pass this, if the binary is
{ARM,Thumb}{,eb}:
<span class="quote">> if (Arch == llvm::Triple::arm || Arch == llvm::Triple::armeb ||
> Arch == llvm::Triple::thumb || Arch == llvm::Triple::thumbeb ||
> (!Args.hasArg(options::OPT_static) &&
> !Args.hasArg(options::OPT_shared))) {
> CmdArgs.push_back("-dynamic-linker");
> CmdArgs.push_back(Args.MakeArgString(
> D.DyldPrefix + getLinuxDynamicLinker(Args, ToolChain)));
> }</span >
from what I can see in the GCC sources[1], they don't pass -dynamic-linker if
either -static or -shared is set.
[1]
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_gcc-2Dmirror_gcc_blob_master_gcc_config_arm_linux-2Delf.h-23L67&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=vkTH7DU8Ee69Hp2nRwNKZ1YmWyDG5Rw-HHR1HarWcZA&s=XJTUcZcNPHyClg9ZzMnG8-N_fYRuZkK5IYm-eMifD5c&e=">https://github.com/gcc-mirror/gcc/blob/master/gcc/config/arm/linux-elf.h#L67</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>