This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Please try this testcase on Solaris.


On Sun, May 19, 2002 at 07:54:48AM -0700, H . J . Lu wrote:
> Here is a small testcase in C. I got
> 
> ./main global lazy
> dlopen flags: RTLD_GLOBAL | RTLD_LAZY:
> module1.so: 1
> module2.so: 1
> ./main global now
> dlopen flags: RTLD_GLOBAL | RTLD_NOW:
> module1.so: 1
> module2.so: 1
> ./main local lazy
> dlopen flags: RTLD_LOCAL | RTLD_LAZY:
> module1.so: 1
> module2.so: 0
> ./main local now
> dlopen flags: RTLD_LOCAL | RTLD_NOW:
> module1.so: 1
> module2.so: 0
> 
> under Linux. Could someone please send me the output on Solaris? I tend
> to believe this is a dynamic linker bug in Linux. Both module1.so and
> module2.so are linked against libbar.so. But libbar.so has an undefined
> symbol which is defined in both module1.so and module2.so. I guess in
> this case, the local scope of module1.so and module2.so should also
> include the local scope of libbar.so.
> 

I think it is really a glibc bug. The problem is when you dlopen a DSO,
which has DT_NEED entries, symbol resolution will go wrong if some DT_NEED
entries have been loaded already with RTLD_LOCAL. I can come up with other
testcases to show this bug.


H.J.


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