[PATCH 7/7] Use global atexit data for all configurations
Sebastian Huber
sebastian.huber@embedded-brains.de
Fri May 13 16:30:04 GMT 2022
On 13/05/2022 15:47, Sebastian Huber wrote:
> For the exit processing only members of _GLOBAL_REENT were used by default. If
> the _REENT_GLOBAL_ATEXIT option was enabled, then the data structures were
> provided to dedicated global objects. Make this option the default. Remove
> the option. Provide the struct _reent _atexit and atexit members only if
> backward binary compatibility is requested (_NEWLIB_BACKWARD_BINARY_COMPAT).
It seems that some code in libgloss accesses this stuff directly:
libgloss/epiphany/crt0.S: add r2,r2,need_to_find_out;
&_GLOBAL_REENT->atexit0
libgloss/epiphany/crt0.S: str r2, [r2,-1];??or -2?;
_GLOBAL_REENT->atexit
libgloss/epiphany/crt0.S: str r0, [r2,1] ;
_GLOBAL_REENT->atexit0._ind
libgloss/epiphany/crt0.S: str r1, [r2,2] ;
_GLOBAL_REENT->atexit0._fns[0]
libgloss/epiphany/crt0.S: add r0,r2,0x14c ;
&_GLOBAL_REENT->atexit0
libgloss/epiphany/crt0.S: str r0, [r0,-1] ;
_GLOBAL_REENT->atexit
libgloss/epiphany/crt0.S: strd r0, [r2,0x2a] ;
_GLOBAL_REENT->atexit0._ind
libgloss/arc/crt0.S: add r1, r1, 0x14c ;
&_GLOBAL_REENT->atexit0
libgloss/arc/crt0.S: st r1, [r1, -4] ;
_GLOBAL_REENT->atexit
libgloss/arc/crt0.S: st_s r0, [r1, 8] ;
_GLOBAL_REENT->atexit0._fns[0]
libgloss/arc/crt0.S: st_s r0, [r1, 4] ;
_GLOBAL_REENT->atexit0._ind
libgloss/sparc_leon/locore_atexit.c: p = _GLOBAL_REENT->_atexit;
libgloss/sparc_leon/locore_atexit.c: _GLOBAL_REENT->_atexit = p =
&_GLOBAL_REENT->_atexit0;
I will update it if the patch is acceptable in general.
--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber@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/
More information about the Newlib
mailing list