------- Comment #4 from dannysmith at users dot sourceforge dot net 2009-07-30 08:00 ------- (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 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40905