x86 TLS when PIC is enabled

Joel Sherrill joel at rtems.org
Mon Sep 25 17:28:55 UTC 2017


HI

I am working on RTEMS on an i386 paravirtualized environment which requires
PIC.
This means the TLS method is not %gs but instead a function call which
appears to
be this per https://www.akkadia.org/drepper/tls.pdf

typedef struct {
  unsigned long ti_module;
  unsigned long ti_offset;
} tls_index;


void *__tls_get_addr(const tls_Index *ti)
{
  // XXX FIX ME
  return NULL;
}

Suggestions on how to fill this method in appreciated.

It looks like the ARM has the same method. Will the same code work?

Thanks.

--joel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20170925/91eecbce/attachment.html>


More information about the devel mailing list