[LLVMdev] [lld] Verifying the Architecture of files read
Shankar Easwaran
shankare at codeaurora.org
Tue Apr 1 22:16:58 PDT 2014
On 4/2/2014 12:06 AM, Rui Ueyama wrote:
> 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.
There are pros and cons to your approach :-
_*pros*_
a) easier to implement
b) lot of usecases that the linker usually deals with, are users
specifying the right architecture
_*cons*_
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).
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.
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.
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.
If I misunderstood your suggestion, please let me know.
Thanks
Shankar Easwaran
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140402/b1b7cb4c/attachment.html>
More information about the llvm-dev
mailing list