<div dir="ltr">I modified cpukit/score/cpu/microblaze/__tls_get_addr.c<div>and added a printf</div><div> printf("TLS OFFSET %x %p %p %d",(uintptr_t) _TLS_Alignment, tls_block,executing->Start.tls_area, ti->offset);<br>and then ran the splts* tests on my hardware.<br>The __tls_get_addr in the splts* tests.<br><br>*** BEGIN OF TEST SPTLS 1 ***<br>*** TEST VERSION: 6.0.0.0cb37ce45e81a2b030cbd99678a42884bc864f84<br>*** TEST STATE: EXPECTED_PASS<br>*** TEST BUILD: RTEMS_POSIX_API<br>*** TEST TOOLS: 10.3.1 20220622 (RTEMS 6, RSB 5a19dda19ffaaa43305af1f34597fd4d8165029b, Newlib 27fd806)<br>TLS item = 123<br>TLS item = 123<br>TLS item = 5<br><br>*** END OF TEST SPTLS 1 ***<br><br><br>[ RTEMS shutdown ]<br>RTEMS version: 6.0.0.0cb37ce45e81a2b030cbd99678a42884bc864f84<br>RTEMS tools: 10.3.1 20220622 (RTEMS 6, RSB 5a19dda19ffaaa43305af1f34597fd4d8165029b, Newlib 27fd806)<br>executing thread ID: 0x08a010001<br>executing thread name: UI1<br><br><br>*** BEGIN OF TEST SPTLS 2 ***<br>*** TEST VERSION: 6.0.0.0cb37ce45e81a2b030cbd99678a42884bc864f84<br>*** TEST STATE: EXPECTED_PASS<br>*** TEST BUILD: RTEMS_POSIX_API<br>*** TEST TOOLS: 10.3.1 20220622 (RTEMS 6, RSB 5a19dda19ffaaa43305af1f34597fd4d8165029b, Newlib 27fd806)<br>A::globalCounter() = 0<br>../../../testsuites/sptests/sptls02/init.cc: 168 extern_int == 7<br><br>[ RTEMS shutdown ]<br>RTEMS version: 6.0.0.0cb37ce45e81a2b030cbd99678a42884bc864f84<br>RTEMS tools: 10.3.1 20220622 (RTEMS 6, RSB 5a19dda19ffaaa43305af1f34597fd4d8165029b, Newlib 27fd806)<br>executing thread ID: 0x08a010001<br>executing thread name: UI1<br><br>RTEMS version: 6.0.0.0cb37ce45e81a2b030cbd99678a42884bc864f84<br>RTEMS tools: 10.3.1 20220622 (RTEMS 6, RSB 5a19dda19ffaaa43305af1f34597fd4d8165029b, Newlib 27fd806)<br>executing thread ID: 0x08a010001<br>executing thread name: UI1<br><br><br>*** BEGIN OF TEST SPTLS 3 ***<br>*** TEST VERSION: 6.0.0.0cb37ce45e81a2b030cbd99678a42884bc864f84<br>*** TEST STATE: EXPECTED_PASS<br>*** TEST BUILD: RTEMS_POSIX_API<br>*** TEST TOOLS: 10.3.1 20220622 (RTEMS 6, RSB 5a19dda19ffaaa43305af1f34597fd4d8165029b, Newlib 27fd806)<br><br>*** END OF TEST SPTLS 3 ***<br><br><br>[ RTEMS shutdown ]<br>RTEMS version: 6.0.0.0cb37ce45e81a2b030cbd99678a42884bc864f84<br>RTEMS tools: 10.3.1 20220622 (RTEMS 6, RSB 5a19dda19ffaaa43305af1f34597fd4d8165029b, Newlib 27fd806)<br>executing thread ID: 0x08a010001<br>executing thread name: UI1<br><br>*** BEGIN OF TEST SPTLS 4 ***<br>*** TEST VERSION: 6.0.0.0cb37ce45e81a2b030cbd99678a42884bc864f84<br>*** TEST STATE: EXPECTED_PASS<br>*** TEST BUILD: RTEMS_POSIX_API<br>*** TEST TOOLS: 10.3.1 20220622 (RTEMS 6, RSB 5a19dda19ffaaa43305af1f34597fd4d8165029b, Newlib 27fd806)<br><br>*** END OF TEST SPTLS 4 ***<br><br><br>[ RTEMS shutdown ]<br>RTEMS version: 6.0.0.0cb37ce45e81a2b030cbd99678a42884bc864f84<br>RTEMS tools: 10.3.1 20220622 (RTEMS 6, RSB 5a19dda19ffaaa43305af1f34597fd4d8165029b, Newlib 27fd806)<br>executing thread ID: 0x08a010001<br>executing thread name: UI1<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 19, 2022 at 2:25 PM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 19/07/2022 20:10, Sam Price wrote:<br>
> <br>
> Where would the ti->offset member be updated / initialized at?<br>
<br>
The caller of __tls_get_addr() has to do this. On ARM, this is function <br>
is normally not used.<br>
<br>
-- <br>
embedded brains GmbH<br>
Herr Sebastian HUBER<br>
Dornierstr. 4<br>
82178 Puchheim<br>
Germany<br>
email: <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
phone: +49-89-18 94 741 - 16<br>
fax: +49-89-18 94 741 - 08<br>
<br>
Registergericht: Amtsgericht München<br>
Registernummer: HRB 157899<br>
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler<br>
Unsere Datenschutzerklärung finden Sie hier:<br>
<a href="https://embedded-brains.de/datenschutzerklaerung/" rel="noreferrer" target="_blank">https://embedded-brains.de/datenschutzerklaerung/</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Sincerely,<br><br>Sam Price<br><br></div></div>