0

I have an issue with binary (already stripped) displaying symbols that leak a confidential information. When I look at binary, all symbols that are of concern are one of T, D or S types.

Now since binary is statically linked (using external static libs that use different namespace), I cannot help but wonder, why do those symbols are global and why ld/strip did not remove them from symbol table?

So there are somehow two related questions:

  • How does compiler/linker decide which symbols are global?
  • Is there a way to make sure that compiler/linker does not export those symbols?
Alexey Kamenskiy
  • 2,888
  • 5
  • 36
  • 56
  • *"is there a way to make sure that compiler/linker does not export those symbols?"* - which symbols? Can you show example source code that demonstrates the problem? Or explain what the symbols are in your project. – John Zwinck Jun 02 '18 at 11:14
  • @JohnZwinck I wish I knew how to provide minimal example without posting here proprietary static libs etc. I guess more important is the first question in the post -- how does compiler/linker decide when those symbols should be global. I will amend to make it more clear. – Alexey Kamenskiy Jun 02 '18 at 11:43
  • Do you mean this [Why is the new C++ visibility support so useful?](https://gcc.gnu.org/wiki/Visibility) and [Export all symbols when creating a DLL](https://stackoverflow.com/questions/225432) – t.niese Jun 02 '18 at 11:57
  • @t.niese in my case all libs are static. I actually do not create a lib. I am using vendor provided libs and link them. But somehow some of my methods appear as exported (methods that use those libs) – Alexey Kamenskiy Jun 02 '18 at 12:02

0 Answers0