From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mumit Khan To: cygwin@sourceware.cygnus.com Subject: Re: Memory Violation With Windres and Shared Data Segments Date: Tue, 31 Aug 1999 23:49:00 -0000 Message-ID: <199908080355.WAA03003@mercury.xraylith.wisc.edu> References: <199908070300.WAA30210@mercury.xraylith.wisc.edu> X-SW-Source: 1999-08n/msg00128.html Message-ID: <19990831234900.pfnUOn6neiTIUN5qVOylIJptKZA_uwJq2pcHQ8wA2Zw@z> Mumit Khan writes: > I did look at it a bit, and here's what's needs to be done: > > - bfd (binutils): Need to be able to specify a shared flag for sections. > That part is somewhat easy. > - gas (binutils): Need to be able parse section flags containing shared > flag. Also easy. > - gcc: Somehow we need to be able to tell the compiler about this "shared" > link. MSVC does it with a linker comment, but GCC doesn't have such > a facility directly. It's going to take a bit of work. I might add > an __attribute__((shared)), but haven't thought of the other > possibilities yet. Just to let you folks know, I just submitted patches to both binutils and gcc to make this happen. In the future, you'll be able to do this: int __attribute__((section ("shared"), shared)) foo = 0; int main () { /* do stuff to foo. */ return 0; } and all running copies of the executable will share ``foo''. Anyone who wants to test it, let me know. I have updated copies of binutils-2.9.4 and gcc-2.95 binaries that you can put somewhere, and use the -B/ argument to test it. Regards, Mumit -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com