[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: two instances of global from shared lib linked with -Bsymbolic
From: |
Rafal Dabrowa |
Subject: |
Re: two instances of global from shared lib linked with -Bsymbolic |
Date: |
Tue, 6 Apr 2004 16:15:41 +0200 |
User-agent: |
KMail/1.6.1 |
On Tuesday 06 of April 2004 15:13, Ian Lance Taylor wrote:
> Rafal Dabrowa <address@hidden> writes:
> > I have created a global (integer) variable in shared library.
> > The library is linked with -Bsymbolic option. Main program
> > sees this variable as a separate copy: any changes of this
> > variable aren't seen in library and vice versa.
>
> Yes, that is what happens when you use -Bsymbolic. If you don't want
> this behaviour, don't use -Bsymbolic.
>
> Ian
Even if the variable is declared as "extern" in main program ? This breaks
language rules !
Suppose we have defined two variables in shared library: glob1 and glob2.
In main program, we have defined only glob1 variable, but we use both glob1
and glob2.
Without -Bsymbolic option, both glob1 and glob2 in program are shared
with
library. With -Bsymbolic option, both have separate copies.
I have a possibility to work under AIX system. It behaves in another
way:
although glob1 has two separate copies, but glob2 is common. And this is
intuitive because glob 1 *is* defined in program, but glob2 is *not* defined
in program - it is only an external variable defined in library. Is there a
possibility to behave that under Linux ?
Rafal
- two instances of global from shared lib linked with -Bsymbolic, Rafal Dabrowa, 2004/04/06
- Re: two instances of global from shared lib linked with -Bsymbolic, Ian Lance Taylor, 2004/04/06
- Re: two instances of global from shared lib linked with -Bsymbolic,
Rafal Dabrowa <=
- Re: two instances of global from shared lib linked with -Bsymbolic, Ian Lance Taylor, 2004/04/06
- Re: two instances of global from shared lib linked with -Bsymbolic, Rafal Dabrowa, 2004/04/06
- Re: two instances of global from shared lib linked with -Bsymbolic, Ian Lance Taylor, 2004/04/06
- Re: two instances of global from shared lib linked with -Bsymbolic, Alan Modra, 2004/04/06
- Re: two instances of global from shared lib linked with -Bsymbolic, Ian Lance Taylor, 2004/04/06
- Re: two instances of global from shared lib linked with -Bsymbolic, Alan Modra, 2004/04/06
- Re: two instances of global from shared lib linked with -Bsymbolic, Rafal Dabrowa, 2004/04/07
- Re: two instances of global from shared lib linked with -Bsymbolic, Alan Modra, 2004/04/07
- Re: two instances of global from shared lib linked with -Bsymbolic, Ian Lance Taylor, 2004/04/07
- Re: two instances of global from shared lib linked with -Bsymbolic, Rafal Dabrowa, 2004/04/08