[LLVMdev] Documentation error in http://llvm.org/docs/LinkTimeOptimization.html

Devang Patel dpatel at apple.com
Fri Aug 24 15:10:09 PDT 2007


Holger,

On Aug 24, 2007, at 2:58 PM, Holger Schurig wrote:

>>> $ llvm-gcc --emit-llvm -c a.c -o a.o
>>> $ llvm-gcc -c main.c -o main.o
>>> $ llvm-gcc a.o main.o -o main
>>> a.o: file not recognized: File format not recognized
>>> collect2: ld returned 1 exit status
>>>
>>> Okay, that did not really work :-/
>>
>> This document describes interface between llvm and linker. You need
>> system linker that implements this interface. LLVM tool kit does not
>> supply system linker.
>
> I'm not sure this is right. I still think that this is a documentation
> error.

It is an error on your part misunderstanding purpose of this  
document. :).

> And it's obvious that the system linker cannot handle LLVM bitcode  
> files,
> this linker is for ELF files. Can you tell me ONE system linker that
> can load and handle LLVM files?  If not, then the documentation still
> describes something that doesn't work in real life.

This is a document for someone who is interested in updating system  
linker or someone who has such linker available. If you don't have  
such linker or you're not interested in updating system linker then  
this document is not for you. Without this document it is not  
straight forward to update system linker such that it can handle LLVM  
bitcode files using LLVMlto library.

BTW, don't assume that there is not any system linker that can handle  
LLVM bitcode files :)
-
Devang




More information about the llvm-dev mailing list