Yuri
2011-Jun-11 17:22 UTC
[LLVMdev] Build of C++ project with clang++ fails (local symbol 1: discarded in section `xxx')
I have C++ project that builds fine with g++. But when I try to replace g++ with clang++ I get such errors (see below) during link. What might be a problem? Yuri --- errors are like this --- local symbol 1: discarded in section `.text.SomeSymbolHere1' local symbol 2: discarded in section `.text.SomeSymbolHere2' ... ...
Samuel Crow
2011-Jun-11 19:40 UTC
[LLVMdev] Build of C++ project with clang++ fails (local symbol 1: discarded in section `xxx')
Hello Yuri, Did you look at http://cfe.llvm.org/compatibility.html yet? --Sam ----- Original Message -----> From: Yuri <yuri at rawbw.com> > To: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu> > Cc: > Sent: Saturday, June 11, 2011 12:22 PM > Subject: [LLVMdev] Build of C++ project with clang++ fails (local symbol 1: discarded in section `xxx') > > I have C++ project that builds fine with g++. > But when I try to replace g++ with clang++ I get such errors (see below) > during link. > What might be a problem? > > Yuri > > --- errors are like this --- > local symbol 1: discarded in section `.text.SomeSymbolHere1' > local symbol 2: discarded in section `.text.SomeSymbolHere2' > ... > ... > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Yuri
2011-Jun-11 20:22 UTC
[LLVMdev] Build of C++ project with clang++ fails (local symbol 1: discarded in section `xxx')
On 06/11/2011 12:40, Samuel Crow wrote:> Did you look athttp://cfe.llvm.org/compatibility.html yet? >I couldn't find any clues there. This site mostly talks about C++ issues stemming from C++ templates. But here is what I noticed: linker complains several times on the same weak symbol (W in 'nm' output) for some inline function that occurs in various .o files in various .a libraries being linked into executable. For example, linker complains on an implicit (compiler-generated) destructor for one class from the header included into many .cpp files. This destructor appears many times as 'W' symbol in all .o files for these .cpp files. Why would linker not ignore W symbols and instead produce such weird error messages? Yuri
Maybe Matching Threads
- [LLVMdev] Build of C++ project with clang++ fails (local symbol 1: discarded in section `xxx')
- [LLVMdev] Fwd: Re: How to identify LLVM version? [updated patch]
- [LLVMdev] --enable-shared doesn't build shared library any more
- [LLVMdev] [PATCH] with no response: Bug 13163 - BlockAddress instruction with use from the global context is damaged during module link
- [LLVMdev] Finding Merge nodes in CFG (ambika@cse.iitb.ac.in)