This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: PATCH: Disable dynamic allocation in atexit
On Tue, 2006-03-21 at 03:22, Mark Mitchell wrote:
> Jeff Johnston wrote:
>
> > I had meant for you to wait. There should at least be a way to default
> > this for a platform in configure.host. See newlib_io_pos_args for an
> > example unless you want me to do it.
>
> Here's a patch to do this. I tested it by (temporarily) modifying
> arm*-*-* to avoid dynamic atexit by default, and verifying that newlib.h
> was generated with the correct value, both with and without that change,
> as well as by verifying that manual configuration options still worked.
>
> If you'd like me to apply this, shout; otherwise, say the word and I'll
> revert the other patch.
>
> Thanks,
Would it be reasonable to make atexit weakly reference malloc, and only
call it if it's been linked in? I can't imagine that there would be
many applications that would blow the static atexit table that wouldn't
call malloc at least once from some other location.
R.