From: khan AT xraylith DOT wisc DOT edu (Mumit Khan) Subject: Re: .init, .fini etc sections -- do these work? 24 Jun 1998 13:46:52 -0700 Message-ID: References: <199806241948 DOT PAA03909 AT subrogation DOT cygnus DOT com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII To: Ian Lance Taylor Cc: sos AT prospect DOT com DOT ru, cygwin32-developers AT cygnus DOT com On Wed, 24 Jun 1998, Ian Lance Taylor wrote: >> Sergey wrote: >> >> If objects contains some sections not defined in linker's script, ld generates invalid executable :-( > > This can be fixed for particular sections in ld/scripttempl/pe.sc. It > can be fixed in general in ld/emultempl/pe.em in the function > gld_${EMULATION_NAME}_place_orphan. That function can arrange for the > section to be properly aligned, or whatever. > But this shouldn't be an issue here since both .init and .fini *are* mentioned in the linker script. There is a also the issue of readonly data section I want to turn (.rdata is also in the script). Hopefully I'm not missing the point here. btw, does the .init and .fini sections in PE work the same way as on SVR4? Regards, Mumit