Here is the problem:
I have a shared library that hides characters by default. In fact, it uses the -Xlinker --version- script = parameter to export some characters to a specific file, but hide everything else. The problem is that if we try to catch the exceptions that were defined in other shared libraries, we get problems because the info type is hidden by this shared library. I cannot explicitly make exception classes visible because they are defined in an open source library that is out of my control. I also do not want to explicitly list the distorted names for typeinfo exception classes in the version-script symbol file, because there are many developers in this library, and they will definitely forget to do this for some exception class in the future.
I tried using #pragma GCC visibility push (by default) in front of the open source .hpp files, but it did not seem to work - the characters were not visible.
I also tried using -fvisibility-ms-compat, which exported characters like info, but also exported a lot of other characters that I did not want to export. There is C and C ++ code in the library, so I'm not sure how it should work with this option, which is intended only for C ++.
I really need an option that will make all characters of type info visible, leaving the other characters hidden (unless they are clearly visible). Is there such an option?
source
share