This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: verbose terminate() on by default
On Dec 23, 2002, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:
> Alexandre Oliva <aoliva@redhat.com> writes:
> | On Dec 23, 2002, Phil Edwards <phil@jaj.com> wrote:
> |
> | > On Mon, Dec 23, 2002 at 02:06:47PM -0200, Alexandre Oliva wrote:
> | >>
> | >> Dynamic linking is not always available on embedded systems, where
> | >> code size matters the most. The verbose implementation may bring in a
> | >> lot of stuff that the developer may have tried hard to avoid using.
> |
> | > Yeah, we should do something special with freestanding environments.
> |
> | Embedded != freestanding. Not having fprintf is one thing, preferring
> | not to use it is an entirely different matter.
> Then it is *its* responsability to set the default handler to suit its
> needs.
Precisely, but this won't prevent the then-unused junk from taking up
space, in case the program references anything else from the same
module so as to bring it in. I.e., my program calls unexpected, so
the module in which the variables that point to the unexpected and the
terminate handlers is brought in. Since this module references the
verbose terminate, this function and everything it needs is brought
into the executable, even though the definition of the terminate
handler is overridden in the main program. There's no way to avoid it.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer