Get list of static libraries used in an executable

后端 未结 5 1176
借酒劲吻你
借酒劲吻你 2020-12-07 13:44

Since ldd lists only the dynamic libraries, is there a way to extract the information about the static libraries used to create the executable?

5条回答
  •  情歌与酒
    2020-12-07 14:05

    If you have the source code and don't want to go through all the code for this, you can generate map file while compiling to know which static libraries are linked.

    For example g++ -Xlinker -Map=a.map main.c, check the map file for linked static library information.

提交回复
热议问题