<div class="gmail_quote">On Sun, Jun 13, 2010 at 2:56 PM, Michael Spencer <span dir="ltr"><<a href="mailto:bigcheesegs@gmail.com">bigcheesegs@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Sun, Jun 13, 2010 at 4:43 PM, Nathan Jeffords<br>
<<a href="mailto:blunted2night@gmail.com">blunted2night@gmail.com</a>> wrote:<br>
>> I know some people are working on native linkers for LLVM. It would be<br>
>> interesting to see an architecture for handling object files that<br>
>> could be shared between lib/MC and a linker.<br>
><br>
><br>
> This would be good I think.<br>
> If a linker loaded object files into an IR, maybe CAssembler could handle<br>
> the linking process also. Would it be safe to assume that on a<br>
> development/build machine, the executable image, and all the object files it<br>
> will be made up of could be loaded into memory in some IR? Or would an<br>
> architecture where the linker only reads headers and symbol information into<br>
> memory and then copies data sections into the final EXE on the fly?<br>
<br>
</div>Considering how large object files can get, I would think it's not a<br>
good idea to load all the content of all the object files into an IR.<br>
However, the object file headers could be loaded into an IR that<br>
references the data still on disk, and then lazily load the data when<br>
it is time to insert relocations and write out the final executable.<br>
<br>
I would also assume that the linker should be able to accept llvm byte<br>
code and output an executable. In a pure llvm/clang tool chain there<br>
should be no reason to use native object files other than linking<br>
against code you only have in native format.<br>
<br>
And back to the topic at hand. I have attached tests that work with<br>
the changes Daniel made to lit. I switched to using llc and .ll files<br>
instead of llvm-mc and .s files due to the lack of COFF support in<br>
llvm-mc.<br>
<br>
- Michael Spencer<br>
</blockquote></div><br><div>Nice, is their any dependencies besides python and a LLVM build enviroment? cygwin? MinGW?</div>