On Wed, 2018-02-07 at 19:26 -0500, Paul Smith wrote: > Thanks for the conversation. I'm moving forward with a real global > operator new/delete and working out the magic needed to ensure those > symbols are not global in our shared library.
I remember one annoying thing I ran into: through compiler "magic" the -fvisibility=hidden compile-time attribute is ignored when it comes to global operator new/delete. Similarly, it's a compiler error to force visibility("hidden") in the declaration via __attribute__. The only way to get operator new/delete to be hidden inside a shared library is to really force it using a linker script that declares them "local:" specifically.