I noticed that Gnome programs are linked with -rdynamic. In most
cases that doesn't seem to be needed, and it seems to increase
program size by about 10% (after stripping).

Is there a good reason for -rdynamic?

A related question (but maybe a bit off-topic for this list):
is it possible in a shared library to hide symbols that you
don't want to export to the outside. I know that this is possible
by declaring the symbol as static, but then you can only use it
within the same source file. I would like to be able to have symbols
that can be referred to from all source files of my shared library,
but are kept hidden for programs that use the shared libary.

(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.)


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