On 01/25/2012 12:03 AM, Rainer Orth wrote: >> Er.. how did we get two copies? > > The link line boils down to > > ld -o eh-1.exe crt1.o crti.o crtbegin.o eh-1.o -litm -lstdc++ -lm -lgcc > -lgcc_eh -lc -lgcc -lgcc_eh crtend.o crtn.o > > The eh-1.o reference to _Unwind_Resume drags in one copy of the unwinder > from libgcc_eh.a, while libstdc++.so is linked against libgcc_s.so.1, > providing another copy.
So... are we linking with the gcc binary, not the g++ binary? Because I thought -shared-libgcc is the default for C++. If this goes too far down a rat-hole, your original patch is ok. r~