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: "Ian Lance Taylor" <ian at zembu dot com>
- Subject: Re: [new test case jluu@mainsoft.com: Re: Possible linker problem]
- From: "Jose Luu" <jluu at mainsoft dot com>
- Date: Wed, 15 Mar 2000 21:35:12 +0100
- Cc: <geoffk at cygnus dot com>, <hjl at lucon dot org>, <binutils at sourceware dot cygnus dot com>
>I actually don't understand why you are having trouble with the
>typeinfo information, since as far as I know that information is
>const. It's true that the -Bsymbolic shared library and the main
>program will be looking at different areas of memory, but so what? If
>the data doesn't change, it should work anyhow.
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 have included the test case for that. The class definition is in the DLL
and is stored under the variable __ti14ParentClassDll, it is this variable
that gets duplicated.
Regards
Jose
t143.tar.gz