Generating executable by llc.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Generating executable by llc.

Sanjiv Gupta
is it possible in llvm infrastructure to integrate an actual linker with llc?  rather than using the native linker.
Can it be done by adding a Module pass?
How difficult it would be to read-in and link the traditional COFF/ELF object files with this integrated linker?
I am looking to do something like this:
 
a.c, b.c ----> llvm-gcc ---> a.bc, b.bc ---> llvm-link ---> combined.bc , native.o ------> llc + integrated linker  ---> final exeutable
 
 
TIA,
Sanjiv

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Generating executable by llc.

John van Schie
Sanjiv,

You can use llvm-ld to link .o files together with .bc files to produce
a native binary by passing it the -native flag. In you case, you would
replace llc with llvm-ld.

Regards,

John

Sanjiv Gupta schreef:

> is it possible in llvm infrastructure to integrate an actual linker
> with llc?  rather than using the native linker.
> Can it be done by adding a Module pass?
> How difficult it would be to read-in and link the traditional COFF/ELF
> object files with this integrated linker?
> I am looking to do something like this:
>  
> a.c, b.c ----> llvm-gcc ---> a.bc, b.bc ---> llvm-link --->
> combined.bc , native.o ------> llc + integrated linker  ---> final
> exeutable
>  
>  
> TIA,
> Sanjiv
> ------------------------------------------------------------------------
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>  

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev