MingW-related setup.exe crash w/ DEP enabled
Christopher Faylor
cgf-use-the-mailinglist-please@cygwin.com
Wed Mar 17 17:44:00 GMT 2010
On Wed, Mar 17, 2010 at 05:50:29PM +0100, Corinna Vinschen wrote:
>Index: autoload.c
>===================================================================
>RCS file: /cvs/cygwin-apps/setup/autoload.c,v
>retrieving revision 2.8
>diff -u -p -r2.8 autoload.c
>--- autoload.c 11 May 2009 10:49:14 -0000 2.8
>+++ autoload.c 17 Mar 2010 16:49:48 -0000
>@@ -27,7 +27,7 @@ typedef struct {
> #define DLL(n) __attribute__ ((used)) static DllInfo n ## _info __asm__ (#n "_info") = { #n, 0}
>
> #define Auto(dll, func, size) \
>- __asm__ ("\t.data"); \
>+ __asm__ ("\t.section .autoload_text,\"wx\""); \
> __asm__ ("\t.global\t_" #func "@" #size); \
> __asm__ ("_" #func "@" #size ":"); \
> __asm__ ("\tcall\tautoload_common"); \
>
>The resulting setup.exe runs fine under DEP.
>
>Is that patch ok, or is there a better way?
Nice catch. I can't belive that we have lived with this for so long.
That looks ok to me. It's sorta like what Cygwin does so it has to
be just perfect.
cgf
More information about the Cygwin-apps
mailing list