Added support for APPMODE=<type>[:<mainFunc>]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ChangeLog: dlls/Makedll.rules.in programs/Makeprog.rules.in
           programs/expand/Makefile.in programs/expand/expand.c
           programs/osversioncheck/Makefile.in
           programs/osversioncheck/osversioncheck.c
           programs/regsvr32/Makefile.in programs/regsvr32/regsvr32.c
           programs/wcmd/Makefile.in programs/wcmd/wcmdmain.c
           programs/winepath/Makefile.in programs/winepath/winepath.c
           programs/winetest/Makefile.in programs/winetest/winetest.c
           tools/winebuild/build.h tools/winebuild/import.c
           tools/winebuild/main.c tools/winebuild/relay.c
           tools/winebuild/spec16.c tools/winebuild/spec32.c
 - .spec files can't be compiled with -g when using Forte C.  This causes static 
variables to have a "random" prefix attached to their name, and prevents the 
assembly code from linking to them correctly.
 - Forte C has linker issues, so cui executables with main() conflicted with 
main() in $WINELOADER.  Renaming main() to main2() solved the issue, so I added 
support to winebuild to allow the main function name to be optionally specified 
in the makefile.
 - Forte C does not support .previous  It was replaced with a .section statement 
for the appropriate section
 - '.section .text' is incorrect.  It should be '.section ".text"'

Gregg Mattinson
Co-op Developer
Sun Microsystems of Canada

Index: dlls/Makedll.rules.in
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/dlls/Makedll.rules.in,v
retrieving revision 1.1
diff -u -r1.1 Makedll.rules.in
--- /tmp/T0hga4IG       Tue Jul  2 16:01:28 2002
+++ Makedll.rules.in    Thu Jun 27 08:05:43 2002
@@ -27,6 +27,9 @@
 $(MAINSPEC).c: $(MAINSPEC) $(RC_SRCS:.rc=.res) $(SYMBOLFILE) $(WINEBUILD)
        $(LDPATH) $(WINEBUILD) $(DEFS) $(SYMBOLFILE:%=-sym %) -o $@ -spec $(SRCDIR)/$(MAINSPEC) $(RC_SRCS:%.rc=-res %.res) -L$(DLLDIR) $(DELAYIMPORTS:%=-dl%) $(IMPORTS:%=-l%)
 
+$(MAINSPEC).o: $(MAINSPEC).c
+       $(CC) -c -o $@ $(MAINSPEC).c
+
 # Rules for .so files
 
 $(MODULE).so: $(ALL_OBJS) Makefile.in
Index: programs/Makeprog.rules.in
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/programs/Makeprog.rules.in,v
retrieving revision 1.1
diff -u -r1.1 Makeprog.rules.in
--- /tmp/T0OHaiSF	Tue Jul  2 13:53:50 2002
+++ Makeprog.rules.in	Thu Jun 27 09:57:43 2002
@@ -27,6 +27,9 @@
 $(MODULE).spec.c: $(RC_SRCS:.rc=.res) $(SYMBOLFILE) $(WINEBUILD)
 	$(LDPATH) $(WINEBUILD) $(DEFS) $(SYMBOLFILE:%=-sym %) -o $@ -exe $(MODULE) $(APPMODE:%=-m%) $(RC_SRCS:%.rc=-res %.res) -L$(DLLDIR) $(DELAYIMPORTS:%=-dl%) $(IMPORTS:%=-l%)
 
+$(MODULE).spec.o: $(MODULE).spec.c
+	$(CC) -c -o $@ $(MODULE).spec.c
+
 # Rules for .so main module
 
 $(MODULE).so: $(MODULE).spec.o $(ALL_OBJS) Makefile.in
Index: programs/expand/Makefile.in
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/programs/expand/Makefile.in,v
retrieving revision 1.1
diff -u -r1.1 Makefile.in
--- /tmp/T0AsaGSF	Tue Jul  2 13:53:53 2002
+++ Makefile.in	Fri Jun 28 09:43:52 2002
@@ -3,7 +3,7 @@
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = expand.exe
-APPMODE   = cui
+APPMODE   = cui:main2
 IMPORTS   = lz32 kernel32
 
 C_SRCS = expand.c
Index: programs/expand/expand.c
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/programs/expand/expand.c,v
retrieving revision 1.1
diff -u -r1.1 expand.c
--- /tmp/T0vwa4SF	Tue Jul  2 13:53:53 2002
+++ expand.c	Fri Jun 28 09:43:59 2002
@@ -23,7 +23,7 @@
 #include <windows.h>
 #include <lzexpand.h>
 
-int main(int argc, char *argv[])
+int main2(int argc, char *argv[])
 {
   OFSTRUCT SourceOpenStruct1, SourceOpenStruct2;
   DWORD dwreturn;
Index: programs/osversioncheck/Makefile.in
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/programs/osversioncheck/Makefile.in,v
retrieving revision 1.1
diff -u -r1.1 Makefile.in
--- /tmp/T0JrayUF	Tue Jul  2 13:53:57 2002
+++ Makefile.in	Fri Jun 28 09:44:10 2002
@@ -3,7 +3,7 @@
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = osversioncheck.exe
-APPMODE   = cui
+APPMODE   = cui:main2
 IMPORTS   = kernel32
 
 C_SRCS = osversioncheck.c
Index: programs/osversioncheck/osversioncheck.c
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/programs/osversioncheck/osversioncheck.c,v
retrieving revision 1.1
diff -u -r1.1 osversioncheck.c
--- /tmp/T0RwaWUF	Tue Jul  2 13:53:57 2002
+++ osversioncheck.c	Fri Jun 28 09:44:21 2002
@@ -54,7 +54,7 @@
 }
 
 int
-main(int argc, char ** argv)
+main2(int argc, char ** argv)
 
 {
   BOOL result;
Index: programs/regsvr32/Makefile.in
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/programs/regsvr32/Makefile.in,v
retrieving revision 1.1
diff -u -r1.1 Makefile.in
--- /tmp/T0nRaGVF	Tue Jul  2 13:54:03 2002
+++ Makefile.in	Fri Jun 28 09:43:23 2002
@@ -4,7 +4,7 @@
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = regsvr32.exe
-APPMODE   = cui
+APPMODE   = cui:main2
 IMPORTS   = msvcrt kernel32
 
 C_SRCS = \
Index: programs/regsvr32/regsvr32.c
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/programs/regsvr32/regsvr32.c,v
retrieving revision 1.1
diff -u -r1.1 regsvr32.c
--- /tmp/T0PXa4VF	Tue Jul  2 13:54:03 2002
+++ regsvr32.c	Fri Jun 28 09:43:32 2002
@@ -160,7 +160,7 @@
     return 0;
 }
 
-int main(int argc, char* argv[])
+int main2(int argc, char* argv[])
 {
     int             i;
     BOOL            CallRegister = TRUE;
Index: programs/wcmd/Makefile.in
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/programs/wcmd/Makefile.in,v
retrieving revision 1.1
diff -u -r1.1 Makefile.in
--- /tmp/T0HwaOWF	Tue Jul  2 13:54:05 2002
+++ Makefile.in	Fri Jun 28 09:44:35 2002
@@ -3,7 +3,7 @@
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = wcmd.exe
-APPMODE   = cui
+APPMODE   = cui:main2
 IMPORTS   = shell32 user32 kernel32
 
 C_SRCS = \
Index: programs/wcmd/wcmdmain.c
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/programs/wcmd/wcmdmain.c,v
retrieving revision 1.1
diff -u -r1.1 wcmdmain.c
--- /tmp/T0uPaiXF	Tue Jul  2 13:54:07 2002
+++ wcmdmain.c	Fri Jun 28 09:44:47 2002
@@ -47,7 +47,7 @@
  * winmain().
  */
 
-int main (int argc, char *argv[]) {
+int main2 (int argc, char *argv[]) {
 
 char string[1024], args[MAX_PATH], param[MAX_PATH];
 int status, i;
Index: programs/winepath/Makefile.in
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/programs/winepath/Makefile.in,v
retrieving revision 1.1
diff -u -r1.1 Makefile.in
--- /tmp/T01faOYF	Tue Jul  2 13:54:13 2002
+++ Makefile.in	Fri Jun 28 09:44:58 2002
@@ -3,7 +3,7 @@
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = winepath.exe
-APPMODE   = cui
+APPMODE   = cui:main2
 IMPORTS   = kernel32
 
 C_SRCS = winepath.c
Index: programs/winepath/winepath.c
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/programs/winepath/winepath.c,v
retrieving revision 1.1
diff -u -r1.1 winepath.c
--- /tmp/T0fnaaZF	Tue Jul  2 13:54:13 2002
+++ winepath.c	Fri Jun 28 09:45:06 2002
@@ -126,7 +126,7 @@
 /*
  * Main function
  */
-int main(int argc, char *argv[])
+int main2(int argc, char *argv[])
 {
     wine_get_unix_file_name_t wine_get_unix_file_name_ptr = NULL;
     static char path[MAX_PATH];
Index: programs/winetest/Makefile.in
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/programs/winetest/Makefile.in,v
retrieving revision 1.1
diff -u -r1.1 Makefile.in
--- /tmp/T0zyaGZF	Tue Jul  2 13:54:14 2002
+++ Makefile.in	Fri Jun 28 09:45:17 2002
@@ -7,7 +7,7 @@
 SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = winetest.exe
-APPMODE   = cui
+APPMODE   = cui:main2
 IMPORTS   = kernel32
 
 C_SRCS = winetest.c
Index: programs/winetest/winetest.c
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/programs/winetest/winetest.c,v
retrieving revision 1.1
diff -u -r1.1 winetest.c
--- /tmp/T0cXay0F	Tue Jul  2 13:54:15 2002
+++ winetest.c	Fri Jun 28 09:45:47 2002
@@ -159,7 +159,7 @@
 }
 
 /* main function */
-int main( int argc, char **argv, char **envp )
+int main2( int argc, char **argv, char **envp )
 {
     PerlInterpreter *perl;
     int status;
Index: tools/winebuild/build.h
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/tools/winebuild/build.h,v
retrieving revision 1.1
diff -u -r1.1 build.h
--- /tmp/T0EOaq4F	Tue Jul  2 13:54:48 2002
+++ build.h	Thu Jun 27 11:08:02 2002
@@ -43,6 +43,12 @@
 # define STRING ".ascii"
 #endif
 
+#ifdef __SUNPRO_C
+# define SHORT  ".half"
+#else
+# define SHORT  ".short"
+#endif
+
 typedef enum
 {
     TYPE_VARIABLE,     /* variable */
Index: tools/winebuild/import.c
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/tools/winebuild/import.c,v
retrieving revision 1.1
diff -u -r1.1 import.c
--- /tmp/T0mAaOqG       Tue Jul  2 15:08:30 2002
+++ import.c    Tue Jul  2 15:04:55 2002
@@ -532,7 +532,7 @@
         }
         pos += 4;
     }
-    fprintf( outfile, "\".previous\");\n#ifndef __GNUC__\n}\n#endif\n\n" );
+    fprintf( outfile, "\".section\t\\\".text\\\"\");\n#ifndef __GNUC__\n}\n#endif\n\n" );
 
  done:
     return nb_imm;
@@ -738,7 +738,7 @@
             fprintf( outfile, "\"\n" );
         }
     }
-    fprintf( outfile, "\".previous\");\n" );
+    fprintf( outfile, "\".section \\\".text\\\"\");\n" );
     fprintf( outfile, "#ifndef __GNUC__\n" );
     fprintf( outfile, "}\n" );
     fprintf( outfile, "#endif\n" );
Index: tools/winebuild/main.c
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/tools/winebuild/main.c,v
retrieving revision 1.1
diff -u -r1.1 main.c
--- /tmp/T0i.aa5F	Tue Jul  2 13:54:49 2002
+++ main.c	Fri Jun 28 09:49:30 2002
@@ -118,6 +118,7 @@
 static void do_f_flags( const char *arg );
 static void do_define( const char *arg );
 static void do_include( const char *arg );
+static void do_k_flags( const char *arg );
 static void do_exe_mode( const char *arg );
 static void do_spec( const char *arg );
 static void do_def( const char *arg );
@@ -141,6 +142,7 @@
     { "-f",       1, do_f_flags, "-f flags         Compiler flags (only -fPIC is supported)" },
     { "-D",       1, do_define,  "-D sym           Ignored for C flags compatibility" },
     { "-I",       1, do_include, "-I dir           Ignored for C flags compatibility" },
+    { "-K",       1, do_k_flags, "-K flags         Compiler flags (only -KPIC is supported)" },
     { "-m",       1, do_exe_mode,"-m mode          Set the executable mode (cui|gui|cuiw|guiw)" },
     { "-L",       1, do_lib,     "-L directory     Look for imports libraries in 'directory'" },
     { "-l",       1, do_import,  "-l lib.dll       Import the specified library" },
@@ -205,6 +207,13 @@
     /* nothing */
 }
 
+static void do_k_flags( const char *arg )
+{
+    /* Ignored, because cc generates correct code. */
+    /* if (!strcmp( arg, "PIC" )) UsePIC = 1; */
+    /* ignore all other flags */
+}
+
 static void do_spec( const char *arg )
 {
     if (exec_mode != MODE_NONE || !arg[0]) do_usage();
@@ -235,6 +244,13 @@
 
 static void do_exe_mode( const char *arg )
 {
+    char *pFunc = strchr(arg, ':');
+
+    if (pFunc) {
+      *pFunc++ = 0;
+      init_func = pFunc;
+    }
+
     if (!strcmp( arg, "gui" )) SpecMode = SPEC_MODE_GUIEXE;
     else if (!strcmp( arg, "cui" )) SpecMode = SPEC_MODE_CUIEXE;
     else if (!strcmp( arg, "guiw" )) SpecMode = SPEC_MODE_GUIEXE_UNICODE;
Index: tools/winebuild/relay.c
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/tools/winebuild/relay.c,v
retrieving revision 1.1
diff -u -r1.1 relay.c
--- /tmp/T0ymay5F	Tue Jul  2 13:54:50 2002
+++ relay.c	Mon Jun 24 13:48:58 2002
@@ -28,7 +28,6 @@
 #include <ctype.h>
 
 #include "thread.h"
-#include "stackframe.h"
 
 #include "build.h"
 
Index: tools/winebuild/spec16.c
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/tools/winebuild/spec16.c,v
retrieving revision 1.1
diff -u -r1.1 spec16.c
--- /tmp/T0CAaW5F	Tue Jul  2 13:54:51 2002
+++ spec16.c	Tue Jun 25 15:15:56 2002
@@ -28,11 +28,9 @@
 #include <assert.h>
 #include <ctype.h>
 
-#include "wine/exception.h"
 #include "wine/library.h"
 #include "builtin16.h"
 #include "module.h"
-#include "stackframe.h"
 
 #include "build.h"
 
@@ -584,7 +582,7 @@
         fprintf( outfile, "    const void *info[15];\n" );
         fprintf( outfile, "  } rec;\n\n" );
         fprintf( outfile, "  extern void __stdcall RtlRaiseException( struct exc_record * );\n\n" );
-        fprintf( outfile, "  rec.code    = 0x%08x;\n", EXCEPTION_WINE_STUB );
+        fprintf( outfile, "  rec.code    = 0x%08x;\n", 0x80000100 );
         fprintf( outfile, "  rec.flags   = %d;\n", EH_NONCONTINUABLE );
         fprintf( outfile, "  rec.rec     = 0;\n" );
         fprintf( outfile, "  rec.params  = 2;\n" );
@@ -706,7 +704,9 @@
 
     /* Output code segment */
 
+#ifndef __SUNPRO_C
     fprintf( outfile, "\n#include \"pshpack1.h\"\n" );
+#endif
     fprintf( outfile, "\nstatic struct code_segment\n{\n" );
     fprintf( outfile, "  struct {\n" );
 #ifdef __i386__
@@ -856,8 +856,9 @@
     res_size = output_res16_data( outfile );
 
     /* Output the DLL descriptor */
-
+#ifndef __SUNPRO_C
     fprintf( outfile, "#include \"poppack.h\"\n\n" );
+#endif
 
     fprintf( outfile, "static const struct dll_descriptor\n{\n" );
     fprintf( outfile, "    unsigned char *module_start;\n" );
@@ -887,11 +888,11 @@
              make_c_identifier(DLLName) );
     fprintf( outfile, "    \"\\t.previous\\n\");\n" );
 #elif defined(__sparc__)
-    fprintf( outfile, "asm(\"\\t.section\t.init ,\\\"ax\\\"\\n\"\n" );
+    fprintf( outfile, "asm(\"\\t.section\t\\\".init\\\" ,\\\"ax\\\"\\n\"\n" );
     fprintf( outfile, "    \"\\tcall " PREFIX "__wine_spec_%s_init\\n\"\n",
              make_c_identifier(DLLName) );
     fprintf( outfile, "    \"\\tnop\\n\"\n" );
-    fprintf( outfile, "    \"\\t.previous\\n\");\n" );
+    fprintf( outfile, "    \"\\t.section\t\\\".text\\\"\\n\");\n" );
 #elif defined(__PPC__)
     fprintf( outfile, "asm(\"\\t.section\t.init ,\\\"ax\\\"\\n\"\n" );
     fprintf( outfile, "    \"\\tbl " PREFIX "__wine_spec_%s_init\\n\"\n",
Index: tools/winebuild/spec32.c
===================================================================
RCS file: /opcom/comp/ws/wine/CVSROOT/wine/tools/winebuild/spec32.c,v
retrieving revision 1.1
diff -u -r1.1 spec32.c
--- /tmp/T0ZtaisG       Tue Jul  2 15:12:44 2002
+++ spec32.c    Tue Jul  2 15:11:17 2002
@@ -30,7 +30,6 @@
 #include <string.h>
 
 #include "winbase.h"
-#include "wine/exception.h"
 #include "build.h"
 
 
@@ -208,10 +207,14 @@
 
         /* output the function names */
 
-        fprintf( outfile, "    \"\\t.text 1\\n\"\n" );
+        fprintf( outfile, "    \"\\t.text\\n\"\n" );
         fprintf( outfile, "    \"__wine_spec_exp_names:\\n\"\n" );
         for (i = 0; i < nb_names; i++)
+#ifdef __SUNPRO_C
+            fprintf( outfile, "    \"\\t" STRING " \\\"%s\\\\0\\\"\\n\"\n", Names[i]->name );
+#else
             fprintf( outfile, "    \"\\t" STRING " \\\"%s\\\"\\n\"\n", Names[i]->name );
+#endif
         fprintf( outfile, "    \"\\t.data\\n\"\n" );
 
         /* output the function ordinals */
@@ -219,12 +222,12 @@
         fprintf( outfile, "    \"__wine_spec_exp_ordinals:\\n\"\n" );
         for (i = 0; i < nb_names; i++)
         {
-            fprintf( outfile, "    \"\\t.short %d\\n\"\n", Names[i]->ordinal - Base );
+            fprintf( outfile, "    \"\\t" SHORT " %d\\n\"\n", Names[i]->ordinal - Base );
         }
         total_size += nb_names * sizeof(short);
         if (nb_names % 2)
         {
-            fprintf( outfile, "    \"\\t.short 0\\n\"\n" );
+            fprintf( outfile, "    \"\\t" SHORT " 0\\n\"\n" );
             total_size += sizeof(short);
         }
     }
@@ -238,7 +241,11 @@
         {
             ORDDEF *odp = Ordinals[i];
             if (odp && odp->type == TYPE_FORWARD)
+#ifdef __SUNPRO_C
+                fprintf( outfile, "    \"\\t" STRING " \\\"%s\\\\0\\\"\\n\"\n", odp->link_name );
+#else
                 fprintf( outfile, "    \"\\t" STRING " \\\"%s\\\"\\n\"\n", odp->link_name );
+#endif
         }
         fprintf( outfile, "    \"\\t.align %d\\n\"\n", get_alignment(4) );
         total_size += (fwd_size + 3) & ~3;
@@ -286,7 +293,7 @@
             case TYPE_CDECL:
                 fprintf( outfile, "    \"\\tjmp " PREFIX "%s\\n\"\n", name );
                 fprintf( outfile, "    \"\\tret\\n\"\n" );
-                fprintf( outfile, "    \"\\t.short 0x%04x\\n\"\n", args );
+                fprintf( outfile, "    \"\\t" SHORT " 0x%04x\\n\"\n", args );
                 fprintf( outfile, "    \"\\t.long " PREFIX "%s,0x%08x\\n\"\n", name, mask );
                 break;
             default:
@@ -335,6 +342,8 @@
         }
     }
 
+    fprintf( outfile, "    \"\\t.text\\n\"\n" );
+    fprintf( outfile, "    \"\\t.align 4\\n\"\n" );
     fprintf( outfile, ");\n\n" );
 
     return total_size;
@@ -366,7 +375,7 @@
         fprintf( outfile, "extern void __stdcall RtlRaiseException( struct exc_record * );\n\n" );
         fprintf( outfile, "static void __wine_unimplemented( const char *func )\n{\n" );
         fprintf( outfile, "  struct exc_record rec;\n" );
-        fprintf( outfile, "  rec.code    = 0x%08x;\n", EXCEPTION_WINE_STUB );
+        fprintf( outfile, "  rec.code    = 0x%08x;\n", 0x80000100 );
         fprintf( outfile, "  rec.flags   = %d;\n", EH_NONCONTINUABLE );
         fprintf( outfile, "  rec.rec     = 0;\n" );
         fprintf( outfile, "  rec.params  = 2;\n" );
@@ -460,9 +469,18 @@
     /* Reserve some space for the PE header */
 
     fprintf( outfile, "extern char pe_header[];\n" );
-    fprintf( outfile, "asm(\".section .text\\n\\t\"\n" );
+
+    fprintf( outfile, "#ifndef __GNUC__\n" );
+    fprintf( outfile, "static void __asm__dummy_header(void) {\n" );
+    fprintf( outfile, "#endif /* !defined(__GNUC__) */\n" );
+
+    fprintf( outfile, "asm(\".section \\\".text\\\"\\n\\t\"\n" );
     fprintf( outfile, "    \".align %d\\n\"\n", get_alignment(page_size) );
-    fprintf( outfile, "    \"" PREFIX "pe_header:\\t.fill %ld,1,0\\n\\t\");\n", page_size );
+    fprintf( outfile, "    \"" PREFIX "pe_header:\\t.skip %ld\\n\\t\");\n", page_size );
+
+    fprintf( outfile, "#ifndef __GNUC__\n" );
+    fprintf( outfile, "}\n" );
+    fprintf( outfile, "#endif /* !defined(__GNUC__) */\n" );
 
     fprintf( outfile, "static const char dllname[] = \"%s\";\n\n", DLLName );
     fprintf( outfile, "extern int __wine_spec_exports[];\n\n" );
@@ -722,11 +740,11 @@
              make_c_identifier(DLLName) );
     fprintf( outfile, "    \"\\t.previous\\n\");\n" );
 #elif defined(__sparc__)
-    fprintf( outfile, "asm(\"\\t.section\t.init ,\\\"ax\\\"\\n\"\n" );
+    fprintf( outfile, "asm(\"\\t.section\t\\\".init\\\" ,\\\"ax\\\"\\n\"\n" );
     fprintf( outfile, "    \"\\tcall " PREFIX "__wine_spec_%s_init\\n\"\n",
              make_c_identifier(DLLName) );
     fprintf( outfile, "    \"\\tnop\\n\"\n" );
-    fprintf( outfile, "    \"\\t.previous\\n\");\n" );
+    fprintf( outfile, "    \"\\t.text\\n\");\n" );
 #elif defined(__PPC__)
     fprintf( outfile, "asm(\"\\t.section\t.init ,\\\"ax\\\"\\n\"\n" );
     fprintf( outfile, "    \"\\tbl " PREFIX "__wine_spec_%s_init\\n\"\n",
@@ -861,14 +879,13 @@
     fprintf( outfile, "    \"\\tcall " PREFIX "__wine_dbg_%s_fini\\n\"\n", prefix );
     fprintf( outfile, "    \"\\t.previous\\n\");\n" );
 #elif defined(__sparc__)
-    fprintf( outfile, "asm(\"\\t.section\t.init ,\\\"ax\\\"\\n\"\n" );
+    fprintf( outfile, "asm(\"\\t.section\t\\\".init\\\" ,\\\"ax\\\"\\n\"\n" );
     fprintf( outfile, "    \"\\tcall " PREFIX "__wine_dbg_%s_init\\n\"\n", prefix );
-    fprintf( outfile, "    \"\\tnop\\n\"\n" );
-    fprintf( outfile, "    \"\\t.previous\\n\");\n" );
-    fprintf( outfile, "asm(\"\\t.section\t.fini ,\\\"ax\\\"\\n\"\n" );
+    fprintf( outfile, "    \"\\tnop\\n\");\n" );
+    fprintf( outfile, "asm(\"\\t.section\t\\\".fini\\\" ,\\\"ax\\\"\\n\"\n" );
     fprintf( outfile, "    \"\\tcall " PREFIX "__wine_dbg_%s_fini\\n\"\n", prefix );
     fprintf( outfile, "    \"\\tnop\\n\"\n" );
-    fprintf( outfile, "    \"\\t.previous\\n\");\n" );
+    fprintf( outfile, "    \"\\t.section\t\\\".text\\\"\\n\");\n" );
 #elif defined(__PPC__)
     fprintf( outfile, "asm(\"\\t.section\t.init ,\\\"ax\\\"\\n\"\n" );
     fprintf( outfile, "    \"\\tbl " PREFIX "__wine_dbg_%s_init\\n\"\n", prefix );

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux