From: Luke D. <cod...@ho...> - 2003-01-29 13:26:58
|
----- Original Message ----- From: "Ulf Karlsson" <ul...@ko...> To: <min...@li...> Sent: Wednesday, January 29, 2003 6:00 PM Subject: [Mingw-users] shared data in DLL > Hi, > > I'm trying to use a shared section in a DLL, but it doesn't seem to > work as I expected it to: > > If I define a variable with > > int var __attribute__ ((section (".shared"), shared)); > > and compile with > > gcc -c -o test.o test.c > gcc -shared -o test.dll test.o > > no .shared section shows up in test.dll when I check with objdump and > Windows complains about that there's something wrong. Is there some > other way of defining a shared data section that works better? > > I'm cross-compiling from Linux. > > gcc version 3.2 (mingw special 20020817-1) > GNU ld version 2.13.90 20021005 > > Regards, > > Ulf This was fixed: 2002-11-04 Danny Smith <dan...@us...> * config/obj-coff.c (obj-coff-section): Set SEC_DATA and SEC_LOAD flags for sections marked as 's'. The latest binutils release candidate was released after that date, so I presume it is fixed in that version. Before that, there was a workaround: http://sourceforge.net/mailarchive/message.php?msg_id=596635 Luke |