Reputation: 571
I have been working in a Big C++ project, which has a huge source of size nearly 300 MB and more than 800 Files. I want to get the Call Stack when the Binary Crashes, so i have captured the Signal and written the call stack from backtrace_symbols to a file. But to get the symbol names from backtrace_symbols, i have compiled with the linker flag '-rdynamic'. I want to know that, using '-rdynamic' impacts any problems ..?
I know that it affects performance, Will adding the -rdynamic linker option to gcc/g++ impact performance?
But does it Affect performance considerably ..?
Does it exposes My Source Code ..? [ I know it won't ,I just want to be sure]
Does it affect total runtime performance or startup time ..?
What are the disadvantages of 'rdynamic' ..?
Upvotes: 13
Views: 5032
Reputation: 7970
Q: But does it Affect performance considerably ..?
A: I've used it on a larger project w/o any degradation.
Q: Does it exposes My Source Code ..?
A: No, it just exposes function names.
Q: Does it affect total runtime performance or startup time ..?
A: In my experience, no. Most functions are already exported. Usually this adds the static functions.
Q: What are the disadvantages of 'rdynamic' ..?
A: rdynamic can be used with dlopen()
to have a shared/global symbol table for the executable which was a must in my project (dynamic_cast<> will work across SO boundaries). The downside is function name collision between SOs.
Upvotes: 15