选项 -rdynamic 用来通知链接器将所有符号添加到动态符号表中
(目的是能够通过使用 dlopen 来实现向后跟踪)
-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.
本文详细解释了在动态链接过程中使用-rdynamic选项的目的,如何通过它将所有符号添加到动态符号表,以及其在实现向后跟踪和获取程序内部回溯时的应用。
1441

被折叠的 条评论
为什么被折叠?



