Re: Bug#118670: g++: libgcc.a symbols end up exported by shared libraries
> In this case, and if you really want that new doesn't throw
> exceptions, you need to supply your own version of libgcc. Given that
> the source is available, this is not too difficult.
Following up to myself, you can just provide a replacement version of
operator new to fix your problem:
#include <new>
void *operator new (size_t){
return 0;
}
int main()
{
int *x = new int;
}
This gives a significan reduction in executable size. Of course, a
real implementation of operator new is more involved :-)
Regards,
Martin
Reply to: