PATCH: use text offset for code

Marcus Meissner meissner at suse.de
Tue Feb 8 10:47:23 CST 2005


Hi,

The 2.6.10 kernel on amd64 does no longer run WINE, since it does
not execute code in .data sections.

Afterwards it starts working fine again. :)

Ciao, Marcus

Changelog:
	Put generated import table code into .text segment.

Index: tools/winebuild/import.c
===================================================================
RCS file: /home/wine/wine/tools/winebuild/import.c,v
retrieving revision 1.71
diff -u -r1.71 import.c
--- tools/winebuild/import.c	18 Oct 2004 21:27:52 -0000	1.71
+++ tools/winebuild/import.c	8 Feb 2005 16:45:47 -0000
@@ -691,7 +691,7 @@
     fprintf( outfile, "#ifndef __GNUC__\nstatic void __asm__dummy_import(void) {\n#endif\n\n" );
     pos = (sizeof(void *) + 2*sizeof(unsigned int) + sizeof(const char *) + sizeof(void *)) *
             (nb_imm + 1);  /* offset of imports.data from start of imports */
-    fprintf( outfile, "asm(\".data\\n\\t.align %d\\n\"\n", get_alignment(8) );
+    fprintf( outfile, "asm(\".text\\n\\t.align %d\\n\"\n", get_alignment(8) );
     fprintf( outfile, "    \"" __ASM_NAME("%s") ":\\n\"\n", import_thunks);
 
     for (i = 0; i < nb_imports; i++)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050208/a1162141/attachment.pgp


More information about the wine-patches mailing list