Impact/Disadvantages of rdynamic gcc option
Asked Answered
D

1

13

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' ..?

Doody answered 10/12, 2013 at 9:54 Comment(0)
G
15

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.

Gynoecium answered 10/12, 2013 at 12:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.