<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 4/2/2014 12:06 AM, Rui Ueyama wrote:<br>
</div>
<blockquote
cite="mid:CAJENXguUE2S5_EtBQfqQ_QQpMiC+OYomiAXi+njfT_V_bTrKXg@mail.gmail.com"
type="cite">
<pre wrap="">So is for PE32 and PE32+. They cannot be mixed because they are for x86 and
x86-64, respectively.
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.
</pre>
</blockquote>
There are pros and cons to your approach :-<br>
<br>
<u><b>pros</b></u><br>
a) easier to implement<br>
b) lot of usecases that the linker usually deals with, are users
specifying the right architecture<br>
<br>
<u><b>cons</b></u><br>
a) the input files will need to be looked at again, either the elf
header has to be re-read or stored in LinkingContext (increase in
memory footprint).<br>
b) there might be an issue with just one input file, and the user
has to wait till all files have been parsed to get the actual error.<br>
c) users use a huge command line linking few
applications(example:building clang), and the cost of revisiting all
the input files may be huge.<br>
<br>
I would prefer the architecture be read/verified at the time of
reading, and stop reading the rest of the files as soon as we see a
discrepancy.<br>
<br>
If I misunderstood your suggestion, please let me know.<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>