[PATCH] D20290: [ThinLTO] Change ODR resolution and internalization to be index-based

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri May 20 12:34:21 PDT 2016


tejohnson added a comment.

In http://reviews.llvm.org/D20290#435534, @tejohnson wrote:

> In http://reviews.llvm.org/D20290#435241, @joker.eph wrote:
>
> > Cannot link llvm-tblgen after this change, I get some strange errors like:
> >
> >   ld: warning: direct access in function 'void std::__1::vector<llvm::CGIOperandList::OperandInfo, std::__1::allocator<llvm::CGIOperandList::OperandInfo> >::__push_back_slow_path<llvm::CGIOperandList::OperandInfo const&>(llvm::CGIOperandList::OperandInfo const&&&)' from file '/tmp/thinlto.o/21.o' to global weak symbol 'std::__1::__split_buffer<llvm::CGIOperandList::OperandInfo, std::__1::allocator<llvm::CGIOperandList::OperandInfo>&>::~__split_buffer()' from file 'utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/CodeGenInstruction.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
> >
> >
> > and
> >
> >   ld: internal error: atom not found in symbolIndex(__ZNSt3__1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_) for architecture x86_64
> >
> >
> > Something is not NFC here...
>
>
> The weak issue seems like it must be related to the linkonce/weak resolution. Let me see if I can repro this here. Meanwhile I will also fix the issues you found, see responses below.


I couldn't reproduce this locally with gold. I did fix the issues you pointed out. Can you give it a try? If it doesn't fix the issue, could you send me more info about the linkage types we started and ended with for the flagged symbols?


http://reviews.llvm.org/D20290





More information about the llvm-commits mailing list