Question about MIPS-TLS DTP relocations

Jags jagadishbb at gmail.com
Mon Dec 29 11:26:06 UTC 2008


Hi All,

With reference to the TLS Support in MIPS, I have one question regarding
MIPS relocations in dynamic linker for static tls objects.

I have my own system libraries, which contains static __thread tls data
types in it.

The readelf of my library shows the following:

readelf -a ./lib/libX.so | grep TLS
  TLS            0x0987a8 0x000a87a8 0x000a87a8 0x00000 0x0000c R   0x4
000adb30  00000026 R_MIPS_TLS_DTPMOD

When I prepare my executable and run it, dynamic linker fails to relocate
the symbols and aborts.

My question is we do not have a relocation type of R_MIPS_TLS_DTPMOD,
instead we have R_MIPS_TLS_DTPMOD32 and R_MIPS_TLS_DTPMOD64.
So my dynamic linker is correct?? Do i need to use -fPIE, instead of -fPIC.

Is my understanding correct. Where could be the problem.

Thanks in advance,
-- 
Jagadish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/mips-tls/attachments/20081229/e837af71/attachment.html>


More information about the mips-tls mailing list