<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Are you planning to commit your work on
this ?<br>
<br>
On 5/6/2013 1:05 PM, Shankar Easwaran wrote:<br>
</div>
<blockquote cite="mid:5187F0E5.4020004@codeaurora.org" type="cite">Hi
Tim,
<br>
<blockquote type="cite">
<blockquote type="cite">The way to test would be :-
<br>
<br>
lld -flavor gnu -target [x86_64|hexagon|x86] ....
<br>
</blockquote>
This was what gave me the linker script error, if I'm
interpreting you
<br>
correctly:
<br>
<br>
$ cat simple.s
<br>
.text
<br>
.global _start
<br>
.type _start,@function
<br>
_start:
<br>
callq bar
<br>
ret
<br>
$ clang simple.s -c- -o- \
<br>
| lld -flavor gnu -target x86_64 emit-yaml -r - \
<br>
| lld -flavor gnu -target x86_64 -
<br>
Failed to read file: -: Error parsing linker script
<br>
<br>
Everything except that last command is just to get an obviously
<br>
correct YAML file containing (in this case) an R_X86_64_PC32.
The idea
<br>
is to make sure that last command can parse "R_X86_64_PC32" as a
<br>
string and knows what to do with it, at least as far as
constructing
<br>
an internal representation.
<br>
</blockquote>
The problem that you are seeing here is because of
ELFTargetInfo::parseFile interpreting the input file as a script.
<br>
<br>
ELFTargetInfo, parses the input file using the following
<br>
<br>
- If the input contains a ELF magic, treat it as ELF file
<br>
- If the input ends in extension *objtxt*, treat it as YAML
<br>
- otherwise treat it as linker script
<br>
<br>
In your case the input is being treated as a linker script as,
stdin based yaml support doesnot exist.
<br>
<br>
Can you convert the file to .objtxt and use that in the command
line.
<br>
<br>
<blockquote type="cite">
<blockquote type="cite">For your case you need to handle aarch64
seperately (see lld-core.cpp).
<br>
</blockquote>
To me it looks like Nick Kledzik's refactoring last month made
<br>
lld-core dead code. It's not added in CMakeLists.txt any more.
<br>
<br>
The replacement (lib/Driver/CoreDriver.cpp) appears to be
completely
<br>
target-agnostic. Is that likely just because no-one has got
around to
<br>
adding target-specific intelligence to it yet, or is it a design
<br>
decision?
<br>
</blockquote>
Ah sorry about the wrong comment. The code changes that you would
need to refer would be
<br>
in function ELFTargetInfo::create in file
lib/ReaderWriter/ELF/ELFTargetInfo.cpp
<br>
<br>
Thanks
<br>
<br>
Shankar Easwaran
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
llvm-commits mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation</pre>
</body>
</html>