This is the mail archive of the cygwin@sourceware.cygnus.com 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]

SOLVED!!! making relocatable dll's under B18 aka Marking dll's as dll's


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@netzone.com)
delete REMOVETHIS from the above to reply
         Mikey
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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