[lld] r202111 - [LinkerScript] OUTPUT_FORMAT: Parse Quoted Strings

Rui Ueyama ruiu at google.com
Mon Feb 24 23:38:21 PST 2014


On Mon, Feb 24, 2014 at 11:24 PM, Shankar Easwaran
<shankare at codeaurora.org>wrote:

> On 2/25/2014 1:14 AM, Rui Ueyama wrote:
>
>> On Mon, Feb 24, 2014 at 10:52 PM, Shankar Easwaran
>> <shankare at codeaurora.org>wrote:
>>
>>  Hi Chandler, Rui,
>>>
>>> For example :-
>>>
>>> OUTPUT_FORMAT(x, "y", "z")
>>>
>>> We need to display an error for the above case, while
>>>
>>> OUTPUT_FORMAT("x", "y", "z") produces no error.
>>>
>>>  Both gave me error...
>>
> I am not sure about your ld version, but here it is :-
>
> $cat x
> OUTPUT_FORMAT(x, "y", "z");
>
> $ld -T x
> ld:x:1: syntax error
> $cat y
> OUTPUT_FORMAT("x", "y", "z");
> $ld -T y
> ld: no input files


OUTPUT_FORMAT( x , "y", "z");

does not print an error (x with surrounding whitespaces). It's not a matter
of double quotes? I found that some parentheses in Linux's libc.so are
surrounded by whitespace characters too, so something may be wrong with "("
handling in GNU LD, but it seems to be different issue from quoted string.



>
>
> Shankar Easwaran
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140224/74fa551f/attachment.html>


More information about the llvm-commits mailing list