[rtems commit] libdl: Add support to import base image TLS symbols

Joel Sherrill joel at rtems.org
Thu Sep 14 15:16:21 UTC 2023


On Thu, Sep 14, 2023 at 4:33 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

>
>
> On 14.09.23 10:51, Chris Johns wrote:
> > On 14/9/2023 5:58 pm, Sebastian Huber wrote:
> >> On 14.09.23 09:38, Chris Johns wrote:
> >>>>> The issue I faced was no score interface to get the TLS base for a
> thread to
> >>>>> determine a symbol's offset. If we had that and something to say if
> TLS is
> >>>>> supported libdl would be easy to fix.
> >>>> Why don't we add this interface if it simplifies things?
> >>> Yes please, that would be good. I do not know the TSL support well
> enough to do
> >>> a decent job of it.
> >> Which interface do you need?
> > A define that says TLS is support for an arch?
> >
> > A call that returns the base address for an arch? I have added some in
> libdl:
> >
> > https://git.rtems.org/rtems/tree/cpukit/libdl/rtl-tls.c
> >
> > however having this in score would mean a new arch does not break libdl.
>
> Yes, this should be definitely added to the CPU port. What is the
> purpose of rtems_rtl_tls_get_base()? It seems to be unused.
>

MIPS does not have TLS support. GCC generates a specific illegal
instruction and the exception handler does the right thing.

Is there a way to tell GCC to use a function call? That would be
much easier across all the secondary architectures.

--joel

>
> --
> embedded brains GmbH
> Herr Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.huber at embedded-brains.de
> phone: +49-89-18 94 741 - 16
> fax:   +49-89-18 94 741 - 08
>
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20230914/9cbde39a/attachment.htm>


More information about the devel mailing list