Heavy SysInit Dependency
Joel Sherrill
joel at rtems.org
Wed May 19 13:09:12 UTC 2021
On Wed, May 19, 2021 at 3:54 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:
> On 19/05/2021 10:23, Chris Johns wrote:
> >> On 19 May 2021, at 5:28 pm, Sebastian Huber<
> sebastian.huber at embedded-brains.de> wrote:
> >>
> >> I am not sure how the dependency chain can be fixed with the current
> struct _reent approach of Newlib. A modern approach would be to replace
> this structure with individual thread-local objects. This would be
> technically feasible, however, a lot of work.
> > Do you mean the _reent structure is expanded out into separate TLS
> elements?
>
> Yes, something like:
>
> thread_local int errno;
>
On paper this would work but most architectures do not have TLS
support from RTEMS right now. On top of that, I honestly can't tell
in GCC how TLS is implemented on many architectures. If there is
a generic pattern, I'd be happy to be educated?
FWIW I looked into the MIPS and it uses a specific invalid instruction
as the TLS "get function". Personally, I'd prefer a way to tell GCC to
just call a real subroutine and avoid architecture specific magic unless
it is going to use a register. And document it.
> --
> 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/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20210519/d4453200/attachment.html>
More information about the devel
mailing list