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: versioning of _Unwind_*() symbols


On Tue, Apr 20, 2004 at 04:35:46PM -0700, David Mosberger wrote:
> >>>>> On Tue, 20 Apr 2004 16:28:02 -0700, "H. J. Lu" <hjl@lucon.org> said:
> 
>   HJ> On Tue, Apr 20, 2004 at 03:40:25PM -0700, Jim Wilson wrote:
> 
>   >> This seems to match with Mark's suggestion of putting the functions back
>   >> in libgcc_s.so to maintain backwards compatibility.
> 
>   HJ> It is a very tricky thing to do with the current Linux dynamic linker.
>   HJ> Those removed functions should be restored. The question is where
>   HJ> they come from. We can't use the old definiton since we want to use
>   HJ> the ones in libunwind. In glibc, we do
> 
>   HJ> foo ()
>   HJ> {
>   HJ> h = dlopen (libgcc)
>   HJ> fn = dlsym (h, "foo");
>   HJ> (*fn) ...
>   HJ> }
> 
>   HJ> so that we can define foo in glibc as a wrapper for foo in libgcc.
>   HJ> Maybe we can do the same for libgcc.
> 
> I didn't think libgcc could/should rely on dlopen()?
> 
> But in any case, for libgcc_s.so, it's sufficient to have a dependency
> on libunwind.so.  The dynamic linker will then take care of loading
> libunwind.so before loading libgcc_s.so.
> 

The current Linux dynamic linker may or may not allow you to move a
versioned definition from one DSO to another:

http://sources.redhat.com/ml/libc-alpha/2003-09/msg00154.html



H.J.


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