Currently I am trying to implement an ELF shared library, built with -static-libstdc++
and -static-libgcc
options. This shared library MUST be built with C++11 and it has some legacy code, besides, it has a very specific design.
If some application links this shared library, their C++ utilities MUST NOT interfere with each other. For example, std::cout
-related, and hence, std::ios_base::Init::Init()
(_ZNSt8ios_base4InitC1Ev
), are awaited to be present in two independent implementations, one static for this specific shared library, and another shared one for the application and it's other shared libraries. However, LD_DEBUG=all
usage shows that there this specific shared library's C++ utility symbols, like std::ios_base::Init::Init()
, get bound to the symbols, defined in libstdc++
, which I try to avoid...
Can such logic be implemented or at least worked around somehow? In any case, I DO NEED separate C++ utility. Thanks in advance!