data and bss tests in dll_list::alloc

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Feb 8 14:55:00 GMT 2012


Hi,


I just fixed a typo in the fabort calls in dll_list::alloc.  But in fact
I'm wondering if we really need the extensive data_start/data_end/
bss_start/bss_end tests.  The reason is simple.  All DLL segments are
always loaded into adjacent addresses, always in the order given by
the DLL segement information.

Therefore, a single address comparison is sufficient to recognize a
situation in which a child DLL is not loaded to the same address as
in the parent.

And given that, we don't even have to compare data and bss addresses
at all.  The HINSTANCE is the address of the module.  Just compare it
to the stored d->handle and if they are not identical, we're done,
right?

Or am I missing something?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat



More information about the Cygwin-developers mailing list