winebuild: Put the PE header into the text section on ARM.

This commit is contained in:
André Hentschel 2012-06-25 00:20:50 +02:00 committed by Alexandre Julliard
parent 0595619e0f
commit e7730053f3
1 changed files with 8 additions and 6 deletions

View File

@ -403,22 +403,24 @@ static void output_asm_constructor( const char *constructor )
} }
else else
{ {
output( "\n\t.section \".init\",\"ax\"\n" );
switch(target_cpu) switch(target_cpu)
{ {
case CPU_x86: case CPU_x86:
case CPU_x86_64: case CPU_x86_64:
output( "\n\t.section \".init\",\"ax\"\n" );
output( "\tcall %s\n", asm_name(constructor) ); output( "\tcall %s\n", asm_name(constructor) );
break; break;
case CPU_SPARC: case CPU_SPARC:
output( "\n\t.section \".init\",\"ax\"\n" );
output( "\tcall %s\n", asm_name(constructor) ); output( "\tcall %s\n", asm_name(constructor) );
output( "\tnop\n" ); output( "\tnop\n" );
break; break;
case CPU_ARM: case CPU_ARM:
output( "\n\t.section \".text\",\"ax\"\n" );
output( "\tblx %s\n", asm_name(constructor) ); output( "\tblx %s\n", asm_name(constructor) );
output( "\t.arm\n" );
break; break;
case CPU_POWERPC: case CPU_POWERPC:
output( "\n\t.section \".init\",\"ax\"\n" );
output( "\tbl %s\n", asm_name(constructor) ); output( "\tbl %s\n", asm_name(constructor) );
break; break;
} }
@ -452,20 +454,20 @@ void output_module( DLLSPEC *spec )
output( "\t.skip %u\n", 65536 + page_size ); output( "\t.skip %u\n", 65536 + page_size );
break; break;
default: default:
output( "\n\t.section \".init\",\"ax\"\n" );
switch(target_cpu) switch(target_cpu)
{ {
case CPU_x86: case CPU_x86:
case CPU_x86_64: case CPU_x86_64:
case CPU_SPARC: case CPU_SPARC:
output( "\n\t.section \".init\",\"ax\"\n" );
output( "\tjmp 1f\n" ); output( "\tjmp 1f\n" );
break; break;
case CPU_ARM: case CPU_ARM:
output( "\n\t.syntax unified\n" ); output( "\n\t.section \".text\",\"ax\"\n" );
output( "\n\t.thumb\n" ); output( "\tb 1f\n" );
output( "\tb.w 1f\n" );
break; break;
case CPU_POWERPC: case CPU_POWERPC:
output( "\n\t.section \".init\",\"ax\"\n" );
output( "\tb 1f\n" ); output( "\tb 1f\n" );
break; break;
} }