This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: SIGSEGV in insert to global container in shared lib


On Wed, 24 Jun 1998, Matthew Benjamin wrote:

: First, when I try to use the latest GNU ld to link this code (with -fPIC and
: --shared options, of course), ld
: dumps core.

Well, that's a bug.  :>

: I found that the Sun linker will link the code (-G option, of course).  But,
: I get a SIGSEGV on the first attempt to insert a value into the container.

Did you remember to use collect2 - NOT just ld?  The Sun linker won't work
because constructors will not be run unless collect2 is used to call the
linker.  For this arrangement, configure egcs without "--with-gnu-ld" and
let it use the system linker.

-- 
-- Todd Vierling (Personal tv@pobox.com; Bus. todd_vierling@xn.xerox.com)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]