[LLVMdev] Type conflicts with linkonce functions
Chris Lattner
sabre at nondot.org
Thu Jun 19 22:30:09 PDT 2008
On Jun 12, 2008, at 11:56 PM, Nathan Keynes wrote:
> Hi,
>
> Currently if the linker encounters a pair of linkonce function
> definitions with different types, it raises an error of the form:
>
> llvm-ld: error: Cannot link file 'item.o.bc': Function
> '_ZN18st_select_lex_unit12first_selectEv' defined as both '
> %struct.SELECT_LEX* (%struct.SELECT_LEX_UNIT*)' and '
> %struct.SELECT_LEX* (%struct.SELECT_LEX_UNIT*)'
>
> I encountered the above while building mysql 5.0.51a after
> dealing with PR1860 - some of the source files appear to have
> slightly different definitions of the same type name, which makes
> the error message especially confusing. In any case, this doesn't
> seem right - I would expect the link to proceed regardless of the
> type mismatch. The patch below is intended to change the linker
> behaviour in the presence of a function type mismatch to add a
> bitcast but otherwise continue linking as normal.
Your patch looks great, applied!
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080616/063909.html
Sorry for the delay,
-Chris
More information about the llvm-dev
mailing list