From: cgf@bbc.com (Christopher Faylor)
Subject: Re:  comments on cygwin32 b19 ld problems
12 Mar 1998 05:37:53 -0800
Message-ID: <199803111839.NAA01649.cygnus.gnu-win32@hardy.bbc.com>
To: gnu-win32@cygnus.com, khan@xraylith.wisc.edu
Cc: ian@cygnus.com, jeffdb@netzone.com, noer@cygnus.com, sos@prospect.com.ru

>Cygwin32 gurus,
>
>Currently, the linker supplied with Cygwin32 b19 has 2 nasty bugs
>   - .rsrc section gets sorted to the end, after .stab and .stabstr, which
>     causes applications with resources to be invalid.
>   - .rdata$* gets sorted incorrectly. I've put in a workaround in the
>     egcs C++ front not to use .rdata$* (read-only data gets placed in 
>     the text section now), so it's almost ok.
>
>Ian Taylor has fixed both of these in new snapshots, and that's the
>good news. 
>
>Here's the bad news. Cygwin32 b19 DLL uses a neat trick to avoid copying 
>certain data on fork -- uses .data$nocopy section. The new linkers correct 
>include these wildcard sections between __data_start__ and __data_end__, 
>but that breaks building cygwin32 dll with new linker (I'm using gas-980303, 
>and it's been like this for a while now).
>
>The incorrect fix in cygwin32 b19 is to put .data$* after __data_end__,
>but that's *WRONG* since it puts the C++ template data, which the front 
>end puts in .data$* sections, after __data_end__ as well, and forked 
>proces: doesn't get a copy!
>
>I know that Ian's away for a bit, which is too bad. I'm hoping to make a
>egcs release when 1.0.2 comes out next week, and I need to include the
>latest binutils snapshot.
>
>Comments from the knowledgable folks??

It should be easy to fix.  We can just name the section ".data_nocopy"
instead of ".data$nocopy" and explicitly include .data_nocopy after __data_end
in the ldtemplate files.

I don't think there is any way to fix this without changing the cygwin code.

cgf
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
