mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 20:30:01 +00:00
winebuild: Output a .note.GNU-stack section to allow nonexecutable stack.
This commit is contained in:
parent
d6d6419602
commit
1ed3ca0883
@ -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_rodata_section(void);
|
||||||
extern const char *get_asm_string_section(void);
|
extern const char *get_asm_string_section(void);
|
||||||
extern void output_function_size( FILE *outfile, const char *name );
|
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_import_dll( const char *name, const char *filename );
|
||||||
extern void add_delayed_import( const char *name );
|
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_DataSelector") );
|
||||||
fprintf( outfile, "%s\n\t.long 0\n", asm_globl("CallTo16_TebSelector") );
|
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") );
|
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 );
|
BuildCallFrom32Regs( outfile );
|
||||||
|
|
||||||
output_function_size( outfile, "__wine_spec_thunk_text_32" );
|
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_stubs( outfile, spec );
|
||||||
output_get_pc_thunk( outfile );
|
output_get_pc_thunk( outfile );
|
||||||
output_init_code( outfile, spec, header_name );
|
output_init_code( outfile, spec, header_name );
|
||||||
|
output_gnu_stack_note( outfile );
|
||||||
|
|
||||||
free( typelist );
|
free( typelist );
|
||||||
}
|
}
|
||||||
|
@ -479,6 +479,7 @@ void BuildSpec32File( FILE *outfile, DLLSPEC *spec )
|
|||||||
output_imports( outfile, spec );
|
output_imports( outfile, spec );
|
||||||
output_resources( outfile, spec );
|
output_resources( outfile, spec );
|
||||||
output_asm_constructor( outfile, "__wine_spec_init_ctor" );
|
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 */
|
/* return a global symbol declaration for an assembly symbol */
|
||||||
const char *asm_globl( const char *func )
|
const char *asm_globl( const char *func )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user