[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 20:03:58 +0200 |
User-agent: |
KMail/1.6.1 |
On Tuesday 06 of April 2004 18:22, Ian Lance Taylor wrote:
> Using -Bsymbolic breaks language rules. That is why it is not the
> default. The option exists because it can make shared library code
> more efficient, for people who do not require strict adherence to
> normal variable usage.
>
> Why are you using -Bsymbolic?
I want to have the following behavior. I have created a shared library with a
lot of functions and global variables exposed to others. But I don't want up
to anybody would override my functions. Suppose I have two functions in my
lib:
void fun1() { ... }
void fun2() { fun1(); ... }
Function fun2 invokes fun1. I want up to fun2 would always invoke fun1 from my
library. It is surprising for me, that if I create fun1 in main program, then
fun2 invokes fun1 from main program instead of library. From this reason I
have added -Bsymbolic option.
But, this option caused that I can't access any global variable from library.
If a library function changes a global from library (e.g. MyErrno), I can't
see the varibale change in main program.
Do you know any solution ?
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, 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, 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
- Re: two instances of global from shared lib linked with -Bsymbolic, Ian Lance Taylor, 2004/04/08