[PATCH] D29640: [ELF] - Linkerscript - fix handling of OUTPUT_ARCH command.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 7 07:40:55 PST 2017
grimar added inline comments.
================
Comment at: ELF/LinkerScript.cpp:1252-1255
+ // Handle cases like i386:x86-64.
+ if (consume(":"))
+ skip();
expect(")");
----------------
ruiu wrote:
> This is too specific to your test case. In general, you want to skip until a matching closing parenthesis.
>
> expect("(");
> while (!Error && !consume(")")
> skip();
That would conflict with testcase we have I think:
```
# RUN: echo "OUTPUT_ARCH(x, y)" > %t.script
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-freebsd %s -o %t1
# RUN: not ld.lld -shared -o %t2 %t1 %t.script
# RUN: llvm-readobj %t2 > /dev/null
```
Isn't that too permissive ?
https://reviews.llvm.org/D29640
More information about the llvm-commits
mailing list