From: jeffdbREMOVETHIS AT netzone DOT com (Mikey) Subject: SOLVED!!! making relocatable dll's under B18 aka Marking dll's as dll's 14 Feb 1998 13:20:49 -0800 Message-ID: <34e8fc7c.3675304.cygnus.gnu-win32@smtp.netzone.com> Reply-To: jeffdbREMOVETHIS AT netzone DOT com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: ian AT cygnus DOT com, gnu-win32 AT cygnus DOT com Hi Ian ;^) Is there some reason why cygwin32 dll's aren't marked as dll's? to make relocatable dll's that link with B18's cygwin.dll/libcygwin.a, or the coolview cygwin.dll/libcygwin.a you MUST give an image base other than 0x10000000, even with a --base-file= option. --image-base 0x10080000+ should be safe. since cygwin.dll isn't marked as a DLL to the system, it dosen't get relocated NO MATTER WHAT!! _reent_data apparently gets overwritten by the one in the new dll, even if no other cygwin.dll functions/data are loaded, so dll's that try to load at that base address are allowed to resulting in the predictable CRASH, at least I think that's what's going on, regardless it WORKS!!!!! finally after 1 1/2 years ~!!!!~ BTW remaking cygwin.dll with the following patch to ld.exe does NOT exhibit this behavior, relocatable dll's get relocated like they are supposed to. (actually according to gdb cygwin.dll gets relocated first then the next one at that address and so on) --- ld/emultempl/pe.em 1997/12/15 16:07:24 1.1 +++ ld/emultempl/pe.em 1998/02/14 16:33:45 @@ -142,6 +142,7 @@ D(MajorSubsystemVersion,"__major_subsystem_version__", 4), D(MinorSubsystemVersion,"__minor_subsystem_version__", 0), D(Subsystem,"__subsystem__", 3), + D(DllCharacteristics,"__dll__", 0), D(SizeOfStackReserve,"__size_of_stack_reserve__", 0x2000000), D(SizeOfStackCommit,"__size_of_stack_commit__", 0x1000), D(SizeOfHeapReserve,"__size_of_heap_reserve__", 0x100000), ===================================================== Linux a platform built by, and for users, standing on the firm legs of reliability, and speed. Microsoft Windows, a platform without a leg to stand on. (jeffdbREMOVETHIS AT netzone DOT com) delete REMOVETHIS from the above to reply Mikey - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".