How is _GLOBAL_REENT meant to be used?

Shaun Jackman sjackman@gmail.com
Mon Apr 24 09:25:00 GMT 2006


On 4/22/06, Thomas Zenker <thz@tuebingen.netsurf.de> wrote:
> Ok, but what if you do not use newlib for threads within a process
> (f.e. under linux), but as independent tasks in a RTOS, then you want to keep
> the information about open files separate for each task. I think same applies to
> atexit lists. ECOS could have the same problem probably.

In this case, each process should have it's own copy of the .data
section of newlib. In that case, newlib should be compiled -fPIC, and
the .data section should be relocated for each process. This task
isn't actually as difficult as it sounds. You might find the utility
elf2flt useful to collect the relocations into an easily read format.

Cheers!
Shaun


More information about the Newlib mailing list