This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Memory Violation With Windres and Shared Data Segments
- To: cygwin@sourceware.cygnus.com
- Subject: Re: Memory Violation With Windres and Shared Data Segments
- From: Mumit Khan <khan@xraylith.wisc.EDU>
- Date: Sat, 07 Aug 1999 22:55:16 -0500
Mumit Khan <khan@xraylith.wisc.EDU> 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<prefix>/ argument to test it.
Regards,
Mumit
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com