glibc-2.2.4/stdlib/atexit.c
/* Copyright (C) 1991, 1996, 1999, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
$ g++ foo.cc -t -D_DESTRUCTOR
/usr/bin/ld: mode elf_i386
/usr/lib/crt1.o
/usr/lib/crti.o
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/crtbegin.o
/tmp/ccDNKWDz.o
-lm (/usr/lib/libm.so)
(/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/libgcc.a)_eh.o
(/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/libgcc.a)exception.o
(/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/libgcc.a)frame.o
(/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/libgcc.a)opdel.o
(/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/libgcc.a)tinfo.o
(/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/libgcc.a)tinfo2.o
/lib/libc.so.6
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/crtend.o
/usr/lib/crtn.o
$ g++ foo.cc -t -D_DESTRUCTOR -D_STATIC
/usr/bin/ld: mode elf_i386
/usr/lib/crt1.o
/usr/lib/crti.o
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/crtbegin.o
/tmp/ccIlZDxP.o
-lm (/usr/lib/libm.so)
(/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/libgcc.a)opdel.o
(/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/libgcc.a)_eh.o
(/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/libgcc.a)exception.o
(/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/libgcc.a)frame.o
(/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/libgcc.a)tinfo.o
(/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/libgcc.a)tinfo2.o
/lib/libc.so.6
<span style=color:red>(/usr/lib/libc_nonshared.a)atexit.oS</span>
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/crtend.o
/usr/lib/crtn.o