diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index a221a9d..a561af9 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -810,7 +810,10 @@ static void output_immediate_import_thunks(void) if (!nb_imm) return; output( "\n/* immediate import thunks */\n\n" ); - output( "\t.text\n" ); + if (target_cpu == CPU_SPARC) + output( "\t.data\n" ); + else + output( "\t.text\n" ); output( "\t.align %d\n", get_alignment(8) ); output( "%s:\n", asm_name(import_thunks)); @@ -935,7 +938,10 @@ static void output_delayed_import_thunks( const DLLSPEC *spec ) if (!nb_delayed) return; output( "\n/* delayed import thunks */\n\n" ); - output( "\t.text\n" ); + if (target_cpu == CPU_SPARC) + output( "\t.data\n" ); + else + output( "\t.text\n" ); output( "\t.align %d\n", get_alignment(8) ); output( "%s:\n", asm_name(delayed_import_loaders)); output( "\t%s\n", func_declaration("__wine_delay_load_asm") ); @@ -1153,7 +1159,10 @@ static void output_external_link_imports( DLLSPEC *spec ) for (i = 0; i < ext_link_imports.count; i++) output( "\t%s %s\n", get_asm_ptr_keyword(), asm_name(ext_link_imports.names[i]) ); - output( "\n\t.text\n" ); + if (target_cpu == CPU_SPARC) + output( "\t.data\n" ); + else + output( "\t.text\n" ); output( "\t.align %d\n", get_alignment(get_ptr_size()) ); output( "%s:\n", asm_name("__wine_spec_external_link_thunks") ); @@ -1283,6 +1292,16 @@ void output_imports( DLLSPEC *spec ) output_delayed_imports( spec ); output_immediate_import_thunks(); output_delayed_import_thunks( spec ); + + if (target_cpu == CPU_SPARC) + { + /* DJANKOV Q&D */ + output( "\n\t.data\n" ); + output( "\t.align %d\n", get_alignment(4) ); + output( "%s:\n", asm_name("_end") ); + output( "\t.long 0\n" ); + } + output_external_link_imports( spec ); if (nb_imports || ext_link_imports.count || has_stubs(spec) || has_relays(spec)) output_get_pc_thunk(); -- 1.4.4.4