Commit 1ed3ca08 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

winebuild: Output a .note.GNU-stack section to allow nonexecutable stack.

parent d6d64196
......@@ -176,6 +176,7 @@ extern const char *get_asm_short_keyword(void);
extern const char *get_asm_rodata_section(void);
extern const char *get_asm_string_section(void);
extern void output_function_size( FILE *outfile, const char *name );
extern void output_gnu_stack_note( FILE *outfile );
extern void add_import_dll( const char *name, const char *filename );
extern void add_delayed_import( const char *name );
......
......@@ -982,6 +982,7 @@ void BuildRelays16( FILE *outfile )
fprintf( outfile, "%s\n\t.long 0\n", asm_globl("CallTo16_DataSelector") );
fprintf( outfile, "%s\n\t.long 0\n", asm_globl("CallTo16_TebSelector") );
if (UsePIC) fprintf( outfile, "wine_ldt_copy_ptr:\t.long %s\n", asm_name("wine_ldt_copy") );
output_gnu_stack_note( outfile );
}
/*******************************************************************
......@@ -1007,4 +1008,5 @@ void BuildRelays32( FILE *outfile )
BuildCallFrom32Regs( outfile );
output_function_size( outfile, "__wine_spec_thunk_text_32" );
output_gnu_stack_note( outfile );
}
......@@ -804,6 +804,7 @@ void BuildSpec16File( FILE *outfile, DLLSPEC *spec )
output_stubs( outfile, spec );
output_get_pc_thunk( outfile );
output_init_code( outfile, spec, header_name );
output_gnu_stack_note( outfile );
free( typelist );
}
......@@ -479,6 +479,7 @@ void BuildSpec32File( FILE *outfile, DLLSPEC *spec )
output_imports( outfile, spec );
output_resources( outfile, spec );
output_asm_constructor( outfile, "__wine_spec_init_ctor" );
output_gnu_stack_note( outfile );
}
......
......@@ -533,6 +533,20 @@ void output_function_size( FILE *outfile, const char *name )
}
}
/* output the GNU note for non-exec stack */
void output_gnu_stack_note( FILE *outfile )
{
switch (target_platform)
{
case PLATFORM_WINDOWS:
case PLATFORM_APPLE:
break;
default:
fprintf( outfile, "\t.section .note.GNU-stack,\"\",@progbits\n" );
break;
}
}
/* return a global symbol declaration for an assembly symbol */
const char *asm_globl( const char *func )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment