This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygwin, libtool, dlpreopen, and .rdata


-----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 <cwilson@spam.protected>

	* 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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]