From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: manfred@s-direktnet.de, Manfred.Hollstein@ks.sel.alcatel.de Cc: ram@netcom.com, egcs@cygnus.com Subject: Re: SunOS shared libs ? Date: Thu, 09 Jul 1998 22:16:00 -0000 Message-id: <1144.900047547@hurl.cygnus.com> References: <13732.58164.680856.974625@slsvhmt> X-SW-Source: 1998-07/msg00366.html In message < 13732.58164.680856.974625@slsvhmt >you write: > if (constructors.number == 0 && destructors.number == 0 > && frame_tables.number == 0 > #if defined (SCAN_LIBRARIES) || defined (COLLECT_EXPORT_LIST) > /* If we will be running these functions ourselves, we want to emit > stubs into the shared library so that we do not have to relink > dependent programs when we add static objects. */ > && ! shared_obj > #endif > ) > > Obviously, the *.number == 0 checks are all true, and shared_obj is > also true, hence it's going the write_c_file way. Does anybody know, > why the stubs are still required, even if no CTOR/DTORs or frame > tables are available? I think, this is plain wrong. I believe this is the desired behavior. Imagine if you later recreate the library -- without changing the interfaces, but it now has an object that needs constructing. If you don't have the stubs already in the library, then any program that was linked against the library will need to be re-linked against the new library. jeff