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
Seemingly Similar Threads
- [LLVMdev] Build of C++ project with clang++ fails (local symbol 1: discarded in section `xxx')
- [LLVMdev] Why clang++ doesn't set 'noreturn' flag on declarations of __cxa_throw and _Unwind_Resume_or_Rethrow ?
- [LLVMdev] Why declaration of llvm.eh.selector differs between documentation and in .ll code written by clang++?
- [LLVMdev] Why clang++ doesn't set 'noreturn' flag on declarations of __cxa_throw and _Unwind_Resume_or_Rethrow ?
- [LLVMdev] Why clang++ doesn't set 'noreturn' flag on declarations of __cxa_throw and _Unwind_Resume_or_Rethrow ?