------- Comment #5 from ktietz at gcc dot gnu dot org 2009-09-04 13:27 ------- (In reply to comment #4) > (In reply to comment #2) > > > > > Is it possible that it triggers the exception trying to write in > > text.unlikely > > which is READONLY? > > > > Exactly. This is a linker, not a compiler issue. If you are using a > relatively recent binutils and mingw run time, the addition of the switch > -Wl,--enable-runtime-pseudo-reloc-v2 should get around the READONLY problem. > Otherwise, you could always just add __declspec (dllimport) to > extern int foo[2]; and so retain portability with the rest of the PE-COFF > world. > > Danny >
Right, this is a linker issue (or runtime issue of pseudo-relocation). But newer mingw32's runtime uses new code for v1 relocations, too. So for it, this issue should be solved, too. So can we close this bug? Cheers, Kai -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40905