This is the mail archive of the
mailing list for the newlib project.
Re: [PATCH] New configuration option for lite exit
- From: Jeff Johnston <jjohnstn at redhat dot com>
- To: newlib at sourceware dot org
- Cc: Joey Ye <joey dot ye at arm dot com>
- Date: Tue, 2 Jul 2013 17:35:41 -0400 (EDT)
- Subject: Re: [PATCH] New configuration option for lite exit
- References: <000001ce3b52$4646b880$d2d42980$ at arm dot com> <CAL0py27CtHj=h3tmr8W+CdnpM-zcF0GPbQxWeNJayYyqcB2REg at mail dot gmail dot com> <20130528102816 dot GE5264 at calimero dot vinschen dot de> <51A65720 dot 8090604 at redhat dot com> <CAL0py25PtLmDUyKXAQqdk8GFkP45AWUBmrffL+8M3iKJaxZKAQ at mail dot gmail dot com> <51BA31B0 dot 4000400 at redhat dot com> <CAL0py27B1Y-jf1pDPmecibv0j1yZWXjQbzH3HfqnV4bhinWs1w at mail dot gmail dot com> <000001ce73da$37810470$a6830d50$ at arm dot com>
Revised patch checked in. I have added a ChangeLog for you.
-- Jeff J.
----- Original Message -----
From: "Joey Ye" <firstname.lastname@example.org>
To: "Jeff Johnston" <email@example.com>
Cc: firstname.lastname@example.org, "Joey Ye" <Joey.Ye@arm.com>
Sent: Friday, June 28, 2013 4:33:48 AM
Subject: RE: [PATCH] New configuration option for lite exit
> From: Jeff Johnston <email@example.com>
> Date: Fri, Jun 14, 2013 at 4:55 AM
> Subject: Re: [PATCH] New configuration option for lite exit
> To: firstname.lastname@example.org
> Please add such documentation to your patch. I might suggest both adding
> to the new README section you have started regarding newlib configuration
> options and to at least one of the source files and you can reference that
> from the others (e.g. put it in atexit and have the other files that are
> tell the developer to look in atexit.c for more details)..
Updated with following changes
- Add description of new option in README
- Add detail description in __atexit.c, and add comments in other .c to look
- Remove dependence between __cxa_finalize and __register_exitproc, replace
with dependence of __call_exitprocs
- Remove changes in __call_atexit.c as it can be covered by
> >> AFAICT, if a call is made to __cxa_atexit, nothing will occur unless
> >> a call is also made to __cxa_finalize or atexit() or on_exit(). The
> >> exit list won't be run on exit if just on_exit() is called because
> >> __call_exitprocs() won't be brought in.
> > This doesn't appear to be true, as __call_exitprocs is always called in
> Maybe I'm missing something. Following the logic, __call_exitprocs is a
> reference in exit. If the user calls on_exit without an
> atexit() call then nothing solidifies the __call_exitprocs linkage.
> If I am correct, please fix and update documentation.
on_exit refers __register_exitproc as non-weak, and now the latter brings in
__call_exitprocs. So it is fixed in this version.
OK to trunk?
Lite exit support.
* README (enable-lite-exit): Doc for new option.
* acconfig.h (_LITE_EXIT): New macro.
* configure.in (enable-lite-exit): New option.
(_LITE_EXIT): Define new macro.
* configure: Regenerated.
* newlib.hin (_LITE_EXIT): New macro.
* libc/stdlib/__atexit.c (__atexit_dummy): Explicit reference to
* libc/stdlib/cxa_atexit.c (__register_exitproc): Weak reference.
* libc/stdlib/exit.c (exit): Remove TWS and weak reference to
* arm/crt0.S (_mainCRTStartup): Weak reference to atexit and _fini
when lite exit is enabled.