
Hello Simon,
On 3 March 2014 09:39, Simon Marlow
I believe the problem is that we can't represent the output of the mangler in LLVM's intermediate language as it stands. Although I think it may now be possible to do this with LLVM 3.4:
http://www.haskell.org/pipermail/ghc-devs/2013-September/002565.html
GHC's code generator needs to be updated to take advantage of this. Is anyone interested in looking into it?
IIUC, GHC can't take advantage of this yet, because global symbol offsets [1] are not yet implemented. LLVM currently doesn't allow arbitrary function prefix data, but requires prefix data to "begin with a sequence of bytes which decode to a sequence of machine instructions, [...] which transfer control to the point immediately succeeding the prefix data" [2]. [1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-April/061511.html [2] http://llvm.org/docs/LangRef.html#prefix-data