This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: Bug in __register_exitproc() in __atexit.c
- From: Freddie Chopin <freddie_chopin at op dot pl>
- To: newlib at sourceware dot org
- Date: Tue, 15 Dec 2015 08:37:16 +0100
- Subject: Re: Bug in __register_exitproc() in __atexit.c
- Authentication-results: sourceware.org; auth=none
- References: <2471870 dot RvHy4mPbXA at infernus> <20151214134201 dot GB28594 at calimero dot vinschen dot de> <1234130603 dot 40343453 dot 1450128201197 dot JavaMail dot zimbra at redhat dot com>
On Monday 14 of December 2015 16:23:21 Jeff Johnston wrote:
> I think I like the weak reference idea. Have register_exitproc make a weak
> reference and have on_exit and __cxa_atexit make a strong reference. If
> someone uses the configuration flags "and" uses on_exit or __cxa_atexit,
> then they pull in the additional static storage and that is the cost of
> using them.
OK, I know how to make the _on_exit_args static instance weak in
__register_exitproc(), but how do I make force it to be linked in when
on_exit() or __cxa_atexit() is used? In other words - how do I make it non-
weak when specific functions - that don't use this variable directly - are
linked?
Thanks for any help!
Regards,
FCh