How do I find out which functions of a shared object are used by a program or an other library?

后端 未结 5 1743
清歌不尽
清歌不尽 2021-01-30 11:37

How do I find out which functions of a shared object are used by a program or an other library? In this specific case, I would like to see which functions in /lib/libgcc1_s.so.1

5条回答
  •  遇见更好的自我
    2021-01-30 12:12

    I'm not aware of one, even nm is of limited use for what you seem to intend. Also, preloading (of the GNU linker) could invalidate any assumptions you make after using a tool that purportedly could do that. See the ld.so man page. LD_PRELOAD can be used by anyone to override the resolution of symbols as it would occur under normal circumstances.

    However, even without a debugger you can use LD_DEBUG to see which function ultimately is being used.

提交回复
热议问题