public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: newlib@sourceware.org
Subject: Re: [PATCH 7/7] Use global atexit data for all configurations
Date: Fri, 13 May 2022 18:30:04 +0200	[thread overview]
Message-ID: <a44a26b1-b6b3-9103-4435-21e8c72ce980@embedded-brains.de> (raw)
In-Reply-To: <20220513134700.68563-8-sebastian.huber@embedded-brains.de>

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/

      reply	other threads:[~2022-05-13 16:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13 13:46 [PATCH 0/7] Add --enable-newlib-backward-binary-compat configure option Sebastian Huber
2022-05-13 13:46 ` [PATCH 1/7] Add --enable-newlib-backward-binary-compat Sebastian Huber
2022-05-13 13:46 ` [PATCH 2/7] Cygwin: Enable backward binary compatibility Sebastian Huber
2022-05-13 20:15   ` Corinna Vinschen
2022-05-16  5:31     ` Sebastian Huber
2022-05-16 11:09       ` Corinna Vinschen
2022-05-13 13:46 ` [PATCH 3/7] Optional struct _reent::__unused_sdidinit Sebastian Huber
2022-05-13 13:46 ` [PATCH 4/7] Optional struct _reent::_unspecified_locale_info Sebastian Huber
2022-05-13 13:46 ` [PATCH 5/7] Optional struct _reent::_new::_unused Sebastian Huber
2022-05-13 13:46 ` [PATCH 6/7] Optional struct _reent::_new::_reent::_unused_rand Sebastian Huber
2022-05-13 13:47 ` [PATCH 7/7] Use global atexit data for all configurations Sebastian Huber
2022-05-13 16:30   ` Sebastian Huber [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a44a26b1-b6b3-9103-4435-21e8c72ce980@embedded-brains.de \
    --to=sebastian.huber@embedded-brains.de \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).