Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com In-Reply-To: <41511C3F.7080003@cwilson.fastmail.fm> References: <41511C3F DOT 7080003 AT cwilson DOT fastmail DOT fm> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <071C94A4-0C6B-11D9-A836-000A95AC9DE6@gnu.org> Content-Transfer-Encoding: 7bit Cc: libtool-patches AT gnu DOT org, cygwin AT cygwin DOT com From: "Gary V.Vaughan" Subject: Re: cygwin, libtool, dlpreopen, and .rdata Date: Wed, 22 Sep 2004 08:43:00 +0100 To: Charles Wilson X-Pgp-Agent: GPGMail 1.0.1 (v33, 10.3) X-Image-Url: http://tkd.kicks-ass.net/images/gary AT gnu DOT org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Chuck! On 22 Sep 2004, at 07:31, Charles Wilson wrote: > Because lt_preloaded_symbols[] is an array of const structs, it is > placed in .rdata. However, the "nothing" symbol is a DATA export from > cyghello-2.dll -- so the runtime psuedo-reloc machinery needs to fixup > the address stored in "lt_preloaded_symbols[3].address" to point to > the actual, relocated memory location of the "nothing" variable. > > But it can't, because .rdata is non-writable. However, this is a > *runtime* error; the *link* succeeds. But when you run the app, you > get a popup window declaring: > > "The application failed to initialize properly (0xc0000005). Click on > OK to terminate the application." Woah, it's just like the old days when we were all afraid of DATA exports on windows ;-) > 2004-09-21 Charles Wilson > > * config/ltmain.in (func_generate_dlsyms): addresses > in _preloaded_symbols[] cannot go into .rdata section > if symbols are DATA imported from DLL, on windows, > because runtime relocations must happen. > * m4/libtool.m4 (_LT_LINKER_SHLIBS([TAGNAME])): > build exports for symbols in .rdata sections Excellent catch. Applied. Thankyou very much! Cheers, Gary. - -- Gary V. Vaughan ())_. gary@{lilith.warpmail.net,gnu.org} Research Scientist ( '/ http://tkd.kicks-ass.net GNU Hacker / )= http://www.gnu.org/software/libtool Technical Author `(_~)_ http://sources.redhat.com/autobook -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (Darwin) iD8DBQFBUS0IFRMICSmD1gYRAqQGAJ427ZJqaNfApLEjZuREBJAE5RRqBQCbBlyJ nHhi1DtLjWV1NB0VT2hHAao= =6Vb8 -----END PGP SIGNATURE----- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/