Re: -rdynamic

Yes it is probably possible to hide symbols, but I don't know if it is
possible to do so in a portable way.

As for use of -rdynamic, it is used in a few places.  For instance, the
guile extension for gnome-terminal makes use of it, and signal
autoconnection in libglade uses it.



On Thu, 26 Aug 1999, Ronald de Man wrote:

> On Thu, Aug 26, 1999 at 08:53:05AM +0930, NotZed wrote:
> > 
> > > (I've converted a program that I've written a while ago into a
> > > shared libary, and I dlopen this library from another program,
> > > but am running into a problem caused by a duplicated symbol names.
> > > Of course I can change this name, but I would think it should be
> > > possible to hide the shared library symbol. For now I've solved it
> > > by not linking the executable with -rdynamic.)
> > 
> > The only way is to use a unique namespace for your library,
> > 
> > e.g.
> >  my_library_the_function()
> > 
> > Is a good way to do it, and used by stuff in gnome (and just about every
> > other library i can think of).
> I know, and that would solve it, but it is not very elegant,
> since I would still export 'internal' symbols that could be used
> by dumb programs, and those programs would stop working after an internal
> change of the library.
> And I would have to change all symbols in existing code.
> To get what I really want, I could join all my sources into one   
> big file, and declare all my 'internal' symbols as static.
> But that's pretty ugly.
> Anyway, if there's no way to do what I want, then I guess I'll
> have to live with it. But it would be nice if it were possible
> to give the linker a list of symbols that are to be exported,
> and make the linker throw away all other symbols. (And I can't
> really see why that's technically impossible.)
> Ronald
> -- 
> To unsubscribe: mail with "unsubscribe"
> as the Subject.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]