In a file from squid, I've read the following comment:
/* Any code using libstdc++ must have externally resolvable overloads
* for void * operator new - which means in the .o for the binary,
* or in a shared library. static libs don't propogate the symbol
* so, look in the translation unit containing main() in squid
* for the extern version in squid
*/
I wonder where that comes from, where such a requirement is stated, and to which versions of gcc resp. libstdc++ it applies. The way I see it, the statement doesn't appear to be true on my system: things work fine without squid providing these symbols, and in fact providing them appears to cause crashes. On the other hand, I think the developers didn't add that comment and the overloaded operators back in 2003 just for the fun of it. I guess they were required in some configurations at that time.
Can you tell me for which configurations (versions, architectures, settings, …) adding such operator definitions might have been a requirement, and why?