Mail Archives: djgpp-workers/1998/01/06/20:18:14
>> I figured out that the stack wasn't being aligned before the
>Yup, I've got that patch already.
I don't think I understand. I pulled down 'djlsr202' from the 980101
directory
on simtelnet and it doesn't appear that the stack is being aligned in
crt1.c.
Do you mean you got the patch and haven't or won't install it or is it just
an oversite?
Here's a diff against the latest alpha if it is the latter.
Andy
--- crt1.old Mon Dec 29 17:09:42 1997
+++ crt1.c Tue Jan 6 17:11:02 1998
@@ -167,6 +167,20 @@
_npxsetup(pn);
_crt0_init_mcount();
__main();
- exit(main(__crt0_argc, __crt0_argv, environ));
+ /* Inline assembly for the following statement plus align the stack to
+ * a double
+ *
+ * exit(main(__crt0_argc, __crt0_argv, environ));
+ */
+ asm("
+ andl $0xFFFFFFF8,%%esp
+ pushl %%eax
+ pushl %0
+ pushl %1
+ pushl %2
+ call _main
+ pushl %%eax
+ call _exit
+ " :: "m" (environ), "m" (__crt0_argv), "m" (__crt0_argc));
}
- Raw text -