freebsd-src/lib
John Polstra d5489b0d8f Check the count in the first word of __CTOR_LIST__ before executing
the loop that invokes the static constructors.  That makes it safe
to link c++rt0.o into any shared library, even one that does not
have any static constructors.  Formerly, doing that would cause a
bus error.  If the library has no static constructors, __CTOR_LIST__
comes out as a simple 4-byte COMMON region, and it does not have
the usual NULL word that terminates the list of constructors.  This
caused the old code to "call" a garbage address via the non-existent
entry __CTOR_LIST__[1].

The analogous code that invokes the static destructors was already safe.

This change is fully backward-compatible.

Reviewed by:	dfr@render.com (Doug Rabson)
1996-01-15 17:53:25 +00:00
..
csu/i386 Check the count in the first word of __CTOR_LIST__ before executing 1996-01-15 17:53:25 +00:00
libc Return pointer to new hash node when search inserts it (e.g. there 1996-01-13 14:25:04 +00:00
libcom_err
libcompat This commit was generated by cvs2svn to compensate for changes in r13122, 1995-12-30 19:02:48 +00:00
libcrypt
libcurses
libdisk
libedit This commit was generated by cvs2svn to compensate for changes in r13122, 1995-12-30 19:02:48 +00:00
libf2c
libF77
libforms
libI77
libipx
libkvm Extract the login name when doing a ps on a dead kernel. 1996-01-01 17:08:17 +00:00
libm
libmd
libmytinfo
libncurses
libpam/modules
libpcap
libresolv
librpcsvc
libscsi
libskey
libss
libtelnet This commit was generated by cvs2svn to compensate for changes in r13122, 1995-12-30 19:02:48 +00:00
libtermcap
libutil Bump libutil revision after recent addition of setproctitle(). 1996-01-01 08:27:41 +00:00
libxpg4
liby
msun
ncurses/ncurses
Makefile
Makefile.inc