Mail Archives: cygwin/2000/09/13/10:27:50
> MSVCRT*.DLL and Cygwin1.dll are mutually exclusive. You can't mix them.
>
> If you want to use MSVCRT*.DLL use the -mno-cygwin option when you compile
> and link.
Thanks, I've added that, and objdump -p confirms that the binary does
not use cygwin.dll, BUT the program still faults in the same way.
To re-iterate, the instructions that try to load the address for
_environ are loading the first 4 bytes from:
(objdump -d -S a.exe)
00401298 <__environ>:
401298: ff 25 d0 30 40 00 jmp *0x4030d0
and using this value causes the access violation. If I manually change
it every time to 0x4030d0, the program can actually execute, although
_environ seems to point to garbage.
At this point, I'm just a bit confused about what's going on. I don't
understand why the 2 bytes for the jmp opcode are there, or
alternatively why the main progam code that tries to load the address
for _environ, accidentally gets 2 bytes of the opcode for jmp and
therefore faults.
The link.map suggests that the address 0x4030d0 is the right place:
.idata$5 0x004030d0 0x4 /usr/lib/libmsvcrt40.a(ds00128.o)
0x004030d0 _imp___environ
The progam works when compiled with msvc, which suggests to me either
there is a problem in the import library, or perhaps have I done the
build incorrectly?
Nigel
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -