dll base address

egor duda deo@logos-m.ru
Sun Jun 10 07:59:00 GMT 2001


Hi!

Sunday, 10 June, 2001 Christopher Faylor cgf@redhat.com wrote:

>>As you can see, cygwin1.dll has been loaded at 02561000. It seems to me
>>that if __cygwin_user_data is a non-relocatble variable, that we should
>>mark cygwin1.dll as non-relocatable.
>>
>>Thoughts?

CF> It's possible that this is just an artifact of faulty handling by gdb.
CF> I'm not aware of any reason for cygwin1.dll to be unrelocatable.

i believe it isn't. when fhandlers are passed between processes,
they're just copied as array of bytes. this includes their vtables. as
long as cygwin1.dll is loaded at equal base addresses, everything's
fine -- all vtables remain valid after copying. but if cygwin1.dll is
relocated in exec()ed process, first call to virtual method in
fhandler cause referencing invalid memory.

i hadn't found a way to access vtable in gcc, so i don't know an
elegant way to fix this.

Egor.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19




More information about the Cygwin-developers mailing list