Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Overhead of rdynamic

2 views
Skip to first unread message

Ryan M

unread,
Dec 12, 2008, 8:58:59 AM12/12/08
to
I was wondering if anyone could give me some background information as
to the overhead (both size and speed) incurred when compiling and
linking with -rdynamic? I have found it useful for backtracing, and
wonder if there are good reasons to avoid it in a release executable.

Nate Eldredge

unread,
Dec 12, 2008, 1:38:27 PM12/12/08
to
Ryan M <ryan.m...@gmail.com> writes:

The GCC manual says:

`-rdynamic'
Pass the flag `-export-dynamic' to the ELF linker, on targets that
support it. This instructs the linker to add all symbols, not only
used ones, to the dynamic symbol table. This option is needed for
some uses of `dlopen' or to allow obtaining backtraces from within
a program.

It's a linker option, so it doesn't affect the code generated by the
compiler. As far as I can tell, the only effect would be to make the
binary larger, which probably isn't a major concern these days.
Presumably the size increase would depend on the number of symbols you
have; why not try it with and without, and see what you observe?

0 new messages