Get list of static libraries used in an executable

后端 未结 5 1180
借酒劲吻你
借酒劲吻你 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 13:51

    ldd shows dynamically linked libraries

    nm shows the symbols in the file.

    To see which symbols come from static libraries requires running nm against those libraries to get a list of the symbols (functions, etc.) in them, then comparing them to what your list of symbols from nm .

    You compare lists with the comm command. See man comm for details.

    This was taken from this forum here.

提交回复
热议问题