This is the mail archive of the 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]

Re: [ANN] mingw32-egcs native dev toolchain

Mumit Khan wrote:
> > However, there are some problems with relocating dlls: If I
> > have a program which uses 2 dlls (both dlls are created by gcc)
> > I get an error, the system complains about not being able to
> > initialize the application properly (NT40SP3). I didn't have
> > this problem with b18 (and mingw32), relocation of dlls worked
> > there. To proof this I loaded the application into gdb (great
> > work, the gdb port BTW) and the application got a segmentation
> > fault just after the system tried to relocate the second dll.
> > I guess the workaround is to specify a particular base address
> > for every dll that no relocation is necessary.
> > This would be acceptable to me.
> >
> I'm not a win32 programmer and have no idea how to do what you just
> suggested. Is this something the end user (eg., you) needs to do, or
> something I need to fix in gcc/ld? There was something similar in the
> mailing list recently which I happened to ignore hoping that it won't
> be a problem in my case.

The end user would have to specify the base address when linking the dll.
However, a fix in ld to avoid this would be great ...

> I'll take another look at mingw32 to make sure I'm not missing any hacks
> to avoid this problem. Any suggestions/insights welcome.

I don't think that it has anything to do with mingw32, since even the startup
code of the relocated dll wouldn't be executed. The NT program loader seems
to get messed up while trying to find the entry point address.

> Mumit


Gunther Ebert
iXOS Anwendungs-Software GmbH
Angerstrasse 40-42
D-04177 Leipzig

Phone : +49 341 48503-0
Fax   : +49 341 48503-99
www   :
For help on using this list (especially unsubscribing), send a message to
"" 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]