according to the https://stackoverflow.com/a/56283942/1012759
Garbage collector for symbols aka --gc-sections
do not work when rdynamic
is turned on because all symbols are implicitly referenced.
I do use ofc -ffunction-sections
, -fdata-sections
to make --gc-sections
possible
I need rdynamic
for pretty prints for calltraces in backtrace. Is there any option to inform compiler to use "rdynamic" only on symbols that are referenced in the code? Or other option that will generate dynamic symbols but only for used functions?
Problem: binary size grows because --gc-section
is blocked by -rdynamic
, but I need -rdynamic
for pretty prints in backtraces