Re: -rdynamic
- From: Ronald de Man <deman win tue nl>
- To: gnome-devel-list gnome org
- Subject: Re: -rdynamic
- Date: Thu, 26 Aug 1999 01:39:32 +0200
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]