<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - Quoted input filename in linker script not supported"
href="https://bugs.llvm.org/show_bug.cgi?id=44498">44498</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Quoted input filename in linker script not supported
</td>
</tr>
<tr>
<th>Product</th>
<td>lld
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>ELF
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>thomas.preudhomme@celest.fr
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, peter.smith@linaro.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=23003" name="attach_23003" title="New checks for input files with special character ('@')">attachment 23003</a> <a href="attachment.cgi?id=23003&action=edit" title="New checks for input files with special character ('@')">[details]</a></span>
New checks for input files with special character ('@')
Jenkins sometimes starts a new working directory by appending @2 (or
incrementing the number if the @n suffix is already there). This causes lld's
test ELF/linkerscript/filename-spec.s to fail the FileCheck call when testing
matching input file with a full path [1]. This happens because the filename is
only parsed up to the @ sign, thus failing silently at linking as expected. In
the same circumstances GNU ld gives the following error:
ignoring invalid character `@' in script
Linker scripts allow filename to be double quoted for cases such like this [2].
This works on GNU ld but does not seem to be supported by lld which seems to
escape the double quotes and try to match a filename with them.
Attached to this bug report is a patch to ELF/linkerscript/filename-spec.s to
add a check for these 2 aspects using ld.bfd to show expected behaviour.
[1]
<a href="https://github.com/llvm/llvm-project/blob/master/lld/test/ELF/linkerscript/filename-spec.s#L33">https://github.com/llvm/llvm-project/blob/master/lld/test/ELF/linkerscript/filename-spec.s#L33</a>
[2] <a href="https://sourceware.org/binutils/docs/ld/Script-Format.html#Script-Format">https://sourceware.org/binutils/docs/ld/Script-Format.html#Script-Format</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>