Allowable characters in linker scripts

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 22 13:06:41 PST 2016


Hi Pete,

Looks like both ld and gold don't think that @ is a valid character in a
token, so I think we shouldn't, too.

$ ld -script <(echo 'SEARCH_DIR( /Volumes/Data/apple-lld-stage1 at 2/ )')
ld:/dev/fd/63:1: ignoring invalid character `@' in expression
ld:/dev/fd/63:1: syntax error

Do you think you can fix the tests by using relative path instead of
absolute path?


On Fri, Jan 22, 2016 at 12:48 PM, Pete Cooper <peter_cooper at apple.com>
wrote:

> Hi Rui, Rafael
>
> I have a jenkins bot building lld.  Due to a plugin called ‘shared
> workspaces’ its common to have @’s in paths.
>
> This bot is then failing on 3 ELF tests (ELF/as-needed.s,
> ELF/linkerscript.s, ELF/linkerscript2.s)
>
> I’ve diagnosed the issue on linkerscript.s and its down to @ not being in
> the set of unquoted tokens in LinkerScript::tokenize.
>
> I’d like to propose a patch, but first I’d like to double check what the
> preferred solution is.  I think its either:
> - Add @ to the allowable characters in a token, or
> - Change the test to quote the path
>
> Which would you prefer?
>
> Thanks,
> Pete
>
> PS, the linkerscipt.s script contains this entry which is the cause of the
> failure: "SEARCH_DIR( /Volumes/Data/apple-lld-stage1 at 2/build/tools/lld/test/ELF/Output/linkerscript2.s.tmp.dir
> )"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160122/cd6fffaa/attachment.html>


More information about the llvm-commits mailing list