winebuild: Use the correct section label on macOS.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2019-03-13 09:51:24 +00:00 committed by Alexandre Julliard
parent f34f13825f
commit b2585d98b2
4 changed files with 24 additions and 2 deletions

View File

@ -281,7 +281,9 @@ extern const char *func_declaration( const char *func );
extern const char *asm_globl( const char *func );
extern const char *get_asm_ptr_keyword(void);
extern const char *get_asm_string_keyword(void);
extern const char *get_asm_export_section(void);
extern const char *get_asm_rodata_section(void);
extern const char *get_asm_rsrc_section(void);
extern const char *get_asm_string_section(void);
extern void output_function_size( const char *name );
extern void output_gnu_stack_note(void);

View File

@ -441,7 +441,7 @@ void output_resources( DLLSPEC *spec )
/* output the resource directories */
output( "\n/* resources */\n\n" );
output( "\t.section %s\n", target_platform == PLATFORM_WINDOWS ? ".rsrc" : ".data" );
output( "\t%s\n", get_asm_rsrc_section() );
output( "\t.align %d\n", get_alignment(get_ptr_size()) );
output( ".L__wine_spec_resources:\n" );

View File

@ -384,7 +384,7 @@ void output_exports( DLLSPEC *spec )
if (!nr_exports) return;
output( "\n/* export table */\n\n" );
output( "\t.section %s\n", target_platform == PLATFORM_WINDOWS ? ".edata" : ".data" );
output( "\t%s\n", get_asm_export_section() );
output( "\t.align %d\n", get_alignment(4) );
output( ".L__wine_spec_exports:\n" );

View File

@ -1201,6 +1201,16 @@ const char *get_asm_string_keyword(void)
}
}
const char *get_asm_export_section(void)
{
switch (target_platform)
{
case PLATFORM_APPLE: return ".data";
case PLATFORM_WINDOWS: return ".section .edata";
default: return ".section .data";
}
}
const char *get_asm_rodata_section(void)
{
switch (target_platform)
@ -1210,6 +1220,16 @@ const char *get_asm_rodata_section(void)
}
}
const char *get_asm_rsrc_section(void)
{
switch (target_platform)
{
case PLATFORM_APPLE: return ".data";
case PLATFORM_WINDOWS: return ".section .rsrc";
default: return ".section .data";
}
}
const char *get_asm_string_section(void)
{
switch (target_platform)