[LLVMdev] TLS with MCJIT (an experimental patch)

Kaylor, Andrew andrew.kaylor at intel.com
Wed May 22 09:30:06 PDT 2013


To clarify, MCJIT currently has no GOT support whatsoever for ELF with x86-64 and ARM (and probably others).  My experimental patch was meant as an attempt to get TLS working with static relocation model and small code model.  It's the combination of these two that requires memory in the lower 2GB.  MCJIT works with static and large, but the MC code generator has a problem with TLS and large code model.

Obviously we just need to get PIC support in place for MCJIT.

-Andy

-----Original Message-----
From: Rafael EspĂ­ndola [mailto:rafael.espindola at gmail.com] 
Sent: Wednesday, May 22, 2013 6:42 AM
To: David Chisnall
Cc: Kaylor, Andrew; LLVM Developers Mailing List
Subject: Re: [LLVMdev] TLS with MCJIT (an experimental patch)

On 22 May 2013 09:37, David Chisnall <David.Chisnall at cl.cam.ac.uk> wrote:
> On 22 May 2013, at 14:28, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:
>
>>  I wouldn't be surprised if
>> these relocations are not implemented yet, but that should be all 
>> that is needed to get tls working.
>
> That was, indeed, where this discussion started.  Andrew's suggestion was to use the small code model, in the hope that this would fix some things.  The lack of support for these relocations is what is stopping my code from working with MCJIT, and your removal of EH is stopping it working with the legacy JIT.


Well, these relocations are there because of the general dynamic tls model, so they would be present on all code models.

Cheers,
Rafael




More information about the llvm-dev mailing list