This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: [new test case jluu@mainsoft.com: Re: Possible linker problem]
- To: jluu at mainsoft dot com
- Subject: Re: [new test case jluu@mainsoft.com: Re: Possible linker problem]
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 15 Mar 2000 13:00:23 -0800
- CC: geoffk at cygnus dot com, hjl at lucon dot org, binutils at sourceware dot cygnus dot com
- References: <009901bf8ebd$f7391660$2a0da8c0@fred.mainsoft.com>
From: "Jose Luu" <jluu@mainsoft.com>
Date: Wed, 15 Mar 2000 21:35:12 +0100
The data does change, that's why. It is apparently initialized when the
shared lib is loaded, but since the shared libs is -Bsymbolic, it is the
initial variable in the shared lib which gets initialized, and its copy in
the main remain uninitialized. When a subclass in the main executable needs
to access the typeinfo it refers to the uninitilized copy and the prog
crashes.
I see. Now that you mention it, I see the code in rtti.c which builds
the constructor. I wonder why it requires dynamic initialization?
Not that it matters.
Ian