[RTEMS Project] #4920: libdl does not support TLS

RTEMS trac trac at rtems.org
Wed Oct 18 12:37:56 UTC 2023


#4920: libdl does not support TLS
-------------------------+---------------------
 Reporter:  Chris Johns  |       Owner:  (none)
     Type:  defect       |      Status:  new
 Priority:  normal       |   Milestone:  6.1
Component:  lib/dl       |     Version:  6
 Severity:  blocker      |  Resolution:
 Keywords:               |  Blocked By:
 Blocking:               |
-------------------------+---------------------

Comment (by Joel Sherrill):

 The rdhwr instruction is undefined and should generate an exception. It is
 expected that the OS will provide the TLS code in that exception. See
 https://www.linux-mips.org/wiki/NPTL for some details.

 I have hoped there was a way in GCC to switch to the generic subroutine
 call but I've never tripped across it. Perhaps something might be obvious
 if you search for that instruction in the mips specific GCC code.

 Replying to [comment:22 Kinsey Moore]:
 > For MIPS in sptls01.exe:
 >
 > Retrieving TLS space:
 > 80010334:       7c03e83b        rdhwr   v0,$29
 >
 > Retrieving value:
 > 80010344:       90429000        lbu     v0,-28672(v0) (negative value is
 a sign-extended 0x9000, significance not understood)
 >
 > Storing value:
 > 800106bc:       24030005        li      v1,5
 > 800106c0:       a0439000        sb      v1,-28672(v0)

--
Ticket URL: <http://devel.rtems.org/ticket/4920#comment:25>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list