Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-owner AT sourceware DOT cygnus DOT com List-Unsubscribe: List-Archive: List-Help: , Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-Id: <199908080355.WAA03003@mercury.xraylith.wisc.edu> To: cygwin AT sourceware DOT cygnus DOT com Subject: Re: Memory Violation With Windres and Shared Data Segments In-Reply-To: Your message of "Fri, 06 Aug 1999 22:00:33 CDT." <199908070300 DOT WAA30210 AT mercury DOT xraylith DOT wisc DOT edu> Date: Sat, 07 Aug 1999 22:55:16 -0500 From: Mumit Khan 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 AT sourceware DOT cygnus DOT com