[haskell-llvm] Towards 0.10

Henning Thielemann lemming at henning-thielemann.de
Sat Jul 16 15:13:12 BST 2011


On Sat, 16 Jul 2011, Mark Wright wrote:

> I can not reproduce it (since I do not have the source code to Array.hs).

https://github.com/bos/llvm/blob/master/examples/Array.hs

The particular example is not important, it is not possible to call 
anything from a module that imports 'llvm' in GHCi.

> The symbol is:
>
> % echo '_Z8do_printIP15LLVMOpaqueValueN4llvm5ValueEEPcT_' |c++filt
> char* do_print<LLVMOpaqueValue*, llvm::Value>(LLVMOpaqueValue*)
> %

Cool trick, didn't know of c++filt before!

> Which is in:
>
> llvm/cbits/extra.cpp
>
> Which means is should be possible to fix that particular missing symbol.

Ah, I see LLVMOpaqueValue is a synonym for LLVMValueRef.
   llvm-c/Core.h:typedef struct LLVMOpaqueValue *LLVMValueRef;


llvm$ nm dist/build/libHSllvm-0.10.0.0-ghc6.12.3.so | fgrep do_print
002c3920 W _Z8do_printIP14LLVMOpaqueTypeN4llvm4TypeEEPcT_
002c3a60 W _Z8do_printIP15LLVMOpaqueValueN4llvm5ValueEEPcT_
00c733a0 r _ZZ8do_printIP14LLVMOpaqueTypeN4llvm4TypeEEPcT_E19__PRETTY_FUNCTION__
00c73360 r _ZZ8do_printIP15LLVMOpaqueValueN4llvm5ValueEEPcT_E19__PRETTY_FUNCTION__

So, some problem with weak symbols?



More information about the Haskell-llvm mailing list