<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 4/2/2014 8:36 PM, Nick Kledzik
wrote:<br>
</div>
<blockquote
cite="mid:F6275BC5-659C-439A-A232-75748322CFD6@apple.com"
type="cite">
<meta http-equiv="Context-Type" content="text/html;
charset=windows-1252">
<div>It is more than “verify” . Mach-o has “fat” (aka “universal”)
files which contain multiple “slices”. Each slice is for a
different arch. The Reader needs to know the intended arch up
front to pick the right slice. </div>
<div><br>
</div>
</blockquote>
Currently the GnuLdDriver creates a LinkingContext(X86_64, X86,
....) from the -target option in the Gnu flavor.<br>
<br>
So here, the driver has to sniff the first file if the -target
option is not mentioned in the command-line I think.<br>
<br>
This would create more problems if the first input file is just a
linker script.<br>
<br>
<blockquote
cite="mid:F6275BC5-659C-439A-A232-75748322CFD6@apple.com"
type="cite">
<div><br>
</div>
<div>
<div>On Apr 1, 2014, at 10:06 PM, Rui Ueyama <<a
moz-do-not-send="true" href="mailto:ruiu@google.com">ruiu@google.com</a>>
wrote:</div>
<blockquote type="cite">
<div dir="ltr">I'd think we can simply wait for all files to
be parsed and pass them to a LinkingContext to ask whether
or not the input file set seems OK.</div>
</blockquote>
</div>
<div><br>
</div>
<div>Except there is no method on lld::File that returns its
“architecture”. <br>
</div>
</blockquote>
Are you thinking of lld::File returning a llvm::Triple as in :-<br>
<br>
llvm::Triple triple() const = 0; <br>
<blockquote
cite="mid:F6275BC5-659C-439A-A232-75748322CFD6@apple.com"
type="cite">
<div><br>
</div>
<div>We’ve been side stepping the issue of how to model
architectures (e.g. triples) in lld. We do need to eventually
nail this down because we need to record that info in yaml and
native files.</div>
<div><br>
</div>
</blockquote>
Agree.<br>
<br>
Thanks<br>
<br>
Shankar Easwaran<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>