[LLVMdev] hello.bc & binary code

John Criswell criswell at cs.uiuc.edu
Mon Dec 22 13:26:12 PST 2003


yue wrote:
> hi,
> 
> I try to build hello.cpp using both llvmg++ and GNU g++,
> the generate llvm bytecode's size is about 960K,
> and the size of binary code generated by g++ is only 13K.
> 
> Could anyone explain the difference between the two result?

	The difference, most likely, is that LLVM only supports static linking 
with LLVM bytecode libraries (presently; this may change in the future). 
  In the case of a C++ program, libstdc++ is statically linked in by 
llvmg++, but dynamically linked in by regular g++.

> 
> BWT:
> I rebuild the cfrontend in RH linux9.0, but when I build the hello.cpp 
> the llvmG++ reports warnings too, it shows:

	I'll have to look into the warnings; I don't know off hand why you're 
getting them.

	Would you be able to post your hello.cpp file to llvmdev?  Now that I 
think of it, I don't think I've ever seen it before.  Having an exact 
copy of it might help.

	Thanks.

Regards,

John T. Criswell

-- 
*********************************************************************
* John T. Criswell                         Email: criswell at uiuc.edu *
* Research Programmer                                               *
* University of Illinois at Urbana-Champaign                        *
*                                                                   *
* "It's today!" said Piglet. "My favorite day," said Pooh.          *
*********************************************************************





More information about the llvm-dev mailing list