GCC -rdynamic not working with static libraries

前端 未结 2 2011
天命终不由人
天命终不由人 2020-12-17 04:03

Why is -rdynamic not exporting the symbols in .a files but is exporting the symbols in .o files ?

I have an app and a plug-in in a .so file. The main app is linked u

2条回答
  •  遥遥无期
    2020-12-17 04:26

    A .o file is ELF relocatable, and, a .so file is ELF shared object. Whereas a .a file is current archive. When the linker is passed the --export-dynamic flag through the -rdynamic from gcc, it is looking for a dynamic object file.

    I think the linker does not care to look into the archive and extract the symbols.

提交回复
热议问题