On Wed, Sep 19, 2001 at 04:53:09PM +0200, Ralf Habacker wrote:
>> No, I mean that an instruction that manipulates the stack results in an
>> error. That indicates to me that the stack pointer is screwed up.
>>
>But that would be code in the ntdll.dll or kernel32.dll ? But as I understand
>does this code uses the stack of the current process, that is for example bash
>or ssp or gdb, isn't it ?
If you don't think it's the stack pointer, you can verify the issue very
quickly. Inspect it in gdb.
(gdb) info reg $esp
(gdb) x/20x $esp
>2. objdump shows that ld by default reserves about 2MB for the dll and
>exe stack. Isn't this enough ?
Who knows? This depends on the application. Have you tried setting the
stack size to something larger? You'd probably have to add a
-Wl,--stack,4194304
to your gcc linker line.
>3. Do you know where I can find informations (online docu) about the
>pe format ? I have recognized some differences in the header like a
>native win32 app and a ld produced app. For example the "Subsystem"
>field differs. Perhaps this is a relocation problem. Do you know any
>way to verify this guess ?
There must be a lot of documentation in Microsoft's MSDN:
http://msdn.microsoft.com/library/default.asp
cgf