diff --git a/include/winnt.h b/include/winnt.h index ece5eed43b4..1ed24e2cec7 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -722,16 +722,16 @@ typedef HANDLE *PHANDLE; #endif #ifdef NEED_TYPE_IN_DEF -# define __ASM_TYPE(name) ".def " __ASM_NAME(#name) "; .scl 2; .type 32; .endef\n" +# define __ASM_FUNC(name) ".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef" #else -# define __ASM_TYPE(name) ".type " __ASM_NAME(#name) ",@function\n" +# define __ASM_FUNC(name) ".type " __ASM_NAME(name) ",@function" #endif #ifdef __GNUC__ # define __ASM_GLOBAL_FUNC(name,code) \ __asm__( ".align 4\n\t" \ ".globl " __ASM_NAME(#name) "\n\t" \ - __ASM_TYPE(name) \ + __ASM_FUNC(#name) "\n" \ __ASM_NAME(#name) ":\n\t" \ code ); #else /* __GNUC__ */ @@ -739,7 +739,7 @@ typedef HANDLE *PHANDLE; void __asm_dummy_##name(void) { \ asm( ".align 4\n\t" \ ".globl " __ASM_NAME(#name) "\n\t" \ - __ASM_TYPE(name) \ + __ASM_FUNC(#name) "\n" \ __ASM_NAME(#name) ":\n\t" \ code ); \ } diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index ddb44754e1d..bbe37b1ba7d 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -8,6 +8,7 @@ #include #include +#include "config.h" #include "winnt.h" #include "build.h" @@ -324,7 +325,7 @@ int output_imports( FILE *outfile ) { for (j = 0; j < dll_imports[i]->nb_imports; j++, pos += 4) { - fprintf( outfile, " \"\\t.type " PREFIX "%s,@function\\n\"\n", + fprintf( outfile, " \"\\t" __ASM_FUNC("%s") "\\n\"\n", dll_imports[i]->imports[j] ); fprintf( outfile, " \"\\t.globl " PREFIX "%s\\n\"\n", dll_imports[i]->imports[j] ); diff --git a/tools/winebuild/relay.c b/tools/winebuild/relay.c index 37f5f0a8fd9..472a4cfd42c 100644 --- a/tools/winebuild/relay.c +++ b/tools/winebuild/relay.c @@ -11,6 +11,7 @@ #include #include +#include "config.h" #include "winnt.h" #include "thread.h" #include "stackframe.h" @@ -94,7 +95,7 @@ static void BuildCallFrom16Core( FILE *outfile, int reg_func, int thunk, int sho #ifdef USE_STABS fprintf( outfile, ".stabs \"__wine_call_from_16_%s:F1\",36,0,0," PREFIX "__wine_call_from_16_%s\n", name, name); #endif - fprintf( outfile, "\t.type " PREFIX "__wine_call_from_16_%s,@function\n", name ); + fprintf( outfile, "\t" __ASM_FUNC("__wine_call_from_16_%s") "\n", name ); fprintf( outfile, "\t.globl " PREFIX "__wine_call_from_16_%s\n", name ); fprintf( outfile, PREFIX "__wine_call_from_16_%s:\n", name ); @@ -452,7 +453,7 @@ static void BuildCallTo16Core( FILE *outfile, int short_ret, int reg_func ) fprintf( outfile, ".stabs \"wine_call_to_16_%s:F1\",36,0,0," PREFIX "wine_call_to_16_%s\n", name, name); #endif - fprintf( outfile, "\t.type " PREFIX "wine_call_to_16_%s,@function\n", name ); + fprintf( outfile, "\t" __ASM_FUNC("wine_call_to_16_%s") "\n", name ); fprintf( outfile, "\t.globl " PREFIX "wine_call_to_16_%s\n", name ); fprintf( outfile, PREFIX "wine_call_to_16_%s:\n", name ); @@ -688,7 +689,7 @@ static void BuildRet16Func( FILE *outfile ) * run-time relocation of the SYSLEVEL_Win16CurrentTeb symbol */ - fprintf( outfile, "\n\t.type " PREFIX "CallTo16_Ret,@function\n" ); + fprintf( outfile, "\n\t" __ASM_FUNC("CallTo16_Ret") "\n" ); fprintf( outfile, "\t.globl " PREFIX "CallTo16_Ret\n" ); fprintf( outfile, PREFIX "CallTo16_Ret:\n" ); diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index 782ef200509..552b9073638 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -389,7 +389,7 @@ static void output_register_funcs( FILE *outfile ) name = make_internal_name( odp, "regs" ); fprintf( outfile, "asm(\".align 4\\n\\t\"\n" - " \".type " PREFIX "%s,@function\\n\\t\"\n" + " \"" __ASM_FUNC("%s") "\\n\\t\"\n" " \"" PREFIX "%s:\\n\\t\"\n" " \"call " PREFIX "CALL32_Regs\\n\\t\"\n" " \".long " PREFIX "%s\\n\\t\"\n"