Huw Davies : winebuild: Use the correct section label on macOS.
Alexandre Julliard
julliard at winehq.org
Wed Mar 13 18:10:50 CDT 2019
Module: wine
Branch: master
Commit: b2585d98b2ec2bb45cba229cf558c3c7a6cbdda7
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b2585d98b2ec2bb45cba229cf558c3c7a6cbdda7
Author: Huw Davies <huw at codeweavers.com>
Date: Wed Mar 13 09:51:24 2019 +0000
winebuild: Use the correct section label on macOS.
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tools/winebuild/build.h | 2 ++
tools/winebuild/res32.c | 2 +-
tools/winebuild/spec32.c | 2 +-
tools/winebuild/utils.c | 20 ++++++++++++++++++++
4 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h
index 1d4f217..603b6e2 100644
--- a/tools/winebuild/build.h
+++ b/tools/winebuild/build.h
@@ -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);
diff --git a/tools/winebuild/res32.c b/tools/winebuild/res32.c
index 634c933..bd55bb2 100644
--- a/tools/winebuild/res32.c
+++ b/tools/winebuild/res32.c
@@ -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" );
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
index d0c147d..65c8d14 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -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" );
diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c
index beff2ab..a1cc9aa 100644
--- a/tools/winebuild/utils.c
+++ b/tools/winebuild/utils.c
@@ -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)
More information about the wine-cvs
mailing list