This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


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

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



>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


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