https://bugs.llvm.org/show_bug.cgi?id=44498
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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
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.
[1]
https://github.com/llvm/llvm-project/blob/master/lld/test/ELF/linkerscript/filename-spec.s#L33
[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._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs