[new test case jluu@mainsoft.com: Re: Possible linker problem]

Jose Luu jluu@mainsoft.com
Wed Mar 15 12:35:00 GMT 2000


>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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: t143.tar.gz
Type: application/x-gzip
Size: 73967 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20000315/ef009736/attachment.bin>


More information about the Binutils mailing list