[JIT] Correct memory mapping?

Hello friendly LLVM and Clang-World,

Because I got helpful information from the LLVM and the Clang-Mailing-List about JITting, I send this message to both.

I’m still not part of the LLVM-Mailing-List, so please put me in cc.

Some days ago I was able to throw an exception in JITted code and also catch this exception in JITed code – all under windows with 64bit and pecoff format of the files. But soon as I apply a memory mapping to the JITed code (the code gets mapped from one memory in the process to another memory from the same process) the exception handling doesn’t work anymore. It seems like the mapping of the memory destroys some offsets.

What can I do against this? I’m acting pretty straight forward when mapping the memory – I map every data and code section. But even if I don’t map “.pdata” and “.xdata” segments, there are still some offsets wrong. Is this a problem from the LLVM or is it my fault?

I hope for some help!

Kind regards
Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, USt.ID-Nr. DE 114 165 789
Geschäftsführer: Hiroshi Kawamura, Dr Hiroshi Nakamura, Markus Bode, Heiko Lampert, Takashi Nagano, Takeshi Fukushima.