[llvm-bugs] [Bug 44498] New: Quoted input filename in linker script not supported

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jan 9 06:32:52 PST 2020


            Bug ID: 44498
           Summary: Quoted input filename in linker script not supported
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: thomas.preudhomme at celest.fr
                CC: llvm-bugs at lists.llvm.org, peter.smith at linaro.org

Created attachment 23003
  --> https://bugs.llvm.org/attachment.cgi?id=23003&action=edit
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.

[2] https://sourceware.org/binutils/docs/ld/Script-Format.html#Script-Format

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200109/4868a7ef/attachment.html>

More information about the llvm-bugs mailing list