RTEMS | cpukit/libdl: No thread-local relocations on i386, microblaze and mips (#5796)

Sebastian Huber (@sebhub) gitlab at rtems.org
Sat Oct 3 13:30:49 UTC 2026



Issue created by Sebastian Huber: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5796



A Newlib built with `--enable-newlib-reent-thread-local` keeps `errno` in thread-local storage.  An object which accesses `errno` carries thread-local relocations.  libdl supports none of them on i386, microblaze and mips, so the load of such an object fails and `dl11` fails on these architectures.

The value of a thread-local symbol of the base image is its offset from the thread pointer.  The relocations `R_386_TLS_LE`, `R_MICROBLAZE_TLSDTPREL64`, `R_MIPS_TLS_TPREL_HI16` and `R_MIPS_TLS_TPREL_LO16` can apply this offset.  `R_MICROBLAZE_TLSLD` needs no value, because `__tls_get_addr()` ignores its argument.

Found while running the full test suite on eleven simulators.  This description was created with Claude Code assistance.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5796
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/namespace/49/sent_notifications/5-1g2upvsdluft619o86gr0km8d-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20261003/875b1b07/attachment.htm>


More information about the bugs mailing list