[LLVMdev] n00b question: From module/bitcode to Mach-O dylib file directly?

Devang Patel dpatel at apple.com
Mon Mar 16 11:35:35 PDT 2009


On Mar 16, 2009, at 1:56 AM, Luke Evans wrote:

> Actually, a related thing I've been curious about is the difference  
> between the output of the llvm-gcc-4.2 front end on the Mac and a  
> regular plain vanilla bit code file.
> The former file can be named a .o and the platform linker now knows  
> how to do LTO while linking against other BC-based and native files.

Yes.

> These are clearly slightly different to native Mach-O obj files, and  
> using a hex editor you can see the bit code enclosed within them -  
> presumably they use the Mach-O envelope but store the BC code in a  
> different section to where native code would be.

It is simpler. There is not any Mach-O envelope. The platform linker  
can directly read Mach-O files as well as llvm bit-code file (using  
llvm bit-code file reader).

> Not sure if/where the exact form of the Mach-O file that carries bit  
> code is documented.

-
Devang




More information about the llvm-dev mailing list