Solaris Global Constructor Bug

Alexandre Oliva oliva@dcc.unicamp.br
Fri Apr 30 23:15:00 GMT 1999


On Apr  5, 1999, Zack Weinberg <zack@rabi.columbia.edu> wrote:

> On Mon, 5 Apr 1999 15:06:46 -0600, dholcomb@amlibs.com wrote:
>> There is an apparent "bug" in the code generated for Solaris
>> platforms.  When the following program (a simple shared-library test
>> program) is compiled with the shared library being compiled with the
>> "-nostdlib" switch, global constructors in the shared library are NOT
>> being called when the library is (implicitly) being opened.  If the
>> "-nostdlib" compiler switch is removed from the compilation of the
>> shared library, global constructors begin to work as expected.

> It seems that on Solaris, -nostdlib implies -nostartfiles.

In fact, -nostdlib is the same as -nostartfiles and -nodefaultlibs,
but the latter options were introduced in recent releases of gcc (I'm
not sure whether it was 2.7 or 2.8)

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Brasil
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists




More information about the Gcc-bugs mailing list