Mail Archives: cygwin/1997/01/25/01:33:19
Mike wrote:
> From the debugger output, it looks like the indirection table
> used by some of the system calls (e.g. lstat, setjmp) are not being
> properly initialized when cygwin.dll is loaded. They seem to be retaining
> data that they had on program start (probably the relative address of the
> routines inside the dlls, but I don't know).
>
> The exact point at which the program dies changes, depending on the
> order of linkage of the exact same modules. For example, if you link with
> one order, setjmp fails by jumping out to an invalid address, relink in a
> different order and lstat does the same thing.
I have exactly the same problem.
I have a call to getsystemtime in my executable. When checking
the linkmap, ld takes the right things from libkernel32.a
But when the image is loaded the call to getsystemtime does not
work because the indirect jump to it is WRONG. I checked this with gdb.
I have checked my executables with
dumpbin/imports
For a bad executable the routine getsystemtime is simply missing from
this import list and I am 100% sure that I use it.
This will cause the program to be loaded incorrectly.
Besides this I have also seen that linking order can make a big difference
in the size of the .text section of the executable. Sometimes it is
simple 3 times a big (instead about 8000 18000 hex).
This also indicates that ld does something wrong when generating the .exe
It only seems to happen with larger programs.
In general it means that one can not trust images generated by ld.
The errors can apear at any state of a project, by simply adding some code.
Who can help me with this problem ??
I am using 17.1
Wiljan Derks
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -