Alexandre Julliard : winebuild: Output the module filename along with the stub data.
Alexandre Julliard
julliard at winehq.org
Wed Mar 6 15:29:40 CST 2019
Module: wine
Branch: master
Commit: a3229faf59d9e562a5eb1e73cd38a21183978d72
URL: https://source.winehq.org/git/wine.git/?a=commit;h=a3229faf59d9e562a5eb1e73cd38a21183978d72
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Mar 6 10:10:49 2019 +0100
winebuild: Output the module filename along with the stub data.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tools/winebuild/import.c | 45 ++++++++++++++++-----------------------------
tools/winebuild/spec32.c | 1 -
2 files changed, 16 insertions(+), 30 deletions(-)
diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
index 6ab7765..2816c65 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -1187,14 +1187,14 @@ static void output_external_link_imports( DLLSPEC *spec )
void output_stubs( DLLSPEC *spec )
{
const char *name, *exp_name;
- int i, count;
+ int i;
if (!has_stubs( spec )) return;
output( "\n/* stub functions */\n\n" );
output( "\t.text\n" );
- for (i = count = 0; i < spec->nb_entry_points; i++)
+ for (i = 0; i < spec->nb_entry_points; i++)
{
ORDDEF *odp = &spec->entry_points[i];
if (odp->type != TYPE_STUB) continue;
@@ -1231,7 +1231,6 @@ void output_stubs( DLLSPEC *spec )
{
output( "\tleal .L%s_string-1b(%%eax),%%ecx\n", name );
output( "\tmovl %%ecx,4(%%esp)\n" );
- count++;
}
else
output( "\tmovl $%d,4(%%esp)\n", odp->ordinal );
@@ -1241,10 +1240,7 @@ void output_stubs( DLLSPEC *spec )
else
{
if (exp_name)
- {
output( "\tmovl $.L%s_string,4(%%esp)\n", name );
- count++;
- }
else
output( "\tmovl $%d,4(%%esp)\n", odp->ordinal );
output( "\tmovl $.L__wine_spec_file_name,(%%esp)\n" );
@@ -1256,10 +1252,7 @@ void output_stubs( DLLSPEC *spec )
output_cfi( ".cfi_adjust_cfa_offset 8" );
output( "\tleaq .L__wine_spec_file_name(%%rip),%%rdi\n" );
if (exp_name)
- {
output( "leaq .L%s_string(%%rip),%%rsi\n", name );
- count++;
- }
else
output( "\tmovq $%d,%%rsi\n", odp->ordinal );
output( "\tcall %s\n", asm_name("__wine_spec_unimplemented_stub") );
@@ -1269,24 +1262,19 @@ void output_stubs( DLLSPEC *spec )
output( "\tadd r0,PC\n");
output( "\tldr r1,2f+4\n");
output( "1:" );
- if (exp_name)
- {
- output( "\tadd r1,PC\n");
- count++;
- }
+ if (exp_name) output( "\tadd r1,PC\n");
output( "\tbl %s\n", asm_name("__wine_spec_unimplemented_stub") );
output( "2:\t.long .L__wine_spec_file_name-1b\n" );
if (exp_name) output( "\t.long .L%s_string-2b\n", name );
else output( "\t.long %u\n", odp->ordinal );
break;
case CPU_ARM64:
- output( "\tadrp x0, %s\n", asm_name("__wine_spec_file_name") );
- output( "\tadd x0, x0, #:lo12:%s\n", asm_name("__wine_spec_file_name") );
+ output( "\tadrp x0, .L__wine_spec_file_name\n" );
+ output( "\tadd x0, x0, #:lo12:.L__wine_spec_file_name\n" );
if (exp_name)
{
output( "\tadrp x1, .L%s_string\n", name );
output( "\tadd x1, x1, #:lo12:.L%s_string\n", name );
- count++;
}
else
output( "\tmov x1, %u\n", odp->ordinal );
@@ -1301,20 +1289,19 @@ void output_stubs( DLLSPEC *spec )
output_function_size( name );
}
- if (count)
+ output( "\t%s\n", get_asm_string_section() );
+ output( ".L__wine_spec_file_name:\n" );
+ output( "\t%s \"%s\"\n", get_asm_string_keyword(), spec->file_name );
+ for (i = 0; i < spec->nb_entry_points; i++)
{
- output( "\t%s\n", get_asm_string_section() );
- for (i = 0; i < spec->nb_entry_points; i++)
+ ORDDEF *odp = &spec->entry_points[i];
+ if (odp->type != TYPE_STUB) continue;
+ exp_name = odp->name ? odp->name : odp->export_name;
+ if (exp_name)
{
- ORDDEF *odp = &spec->entry_points[i];
- if (odp->type != TYPE_STUB) continue;
- exp_name = odp->name ? odp->name : odp->export_name;
- if (exp_name)
- {
- name = get_stub_name( odp, spec );
- output( ".L%s_string:\n", name );
- output( "\t%s \"%s\"\n", get_asm_string_keyword(), exp_name );
- }
+ name = get_stub_name( odp, spec );
+ output( ".L%s_string:\n", name );
+ output( "\t%s \"%s\"\n", get_asm_string_keyword(), exp_name );
}
}
}
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
index 0547ba2..80124f0 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -685,7 +685,6 @@ void output_module( DLLSPEC *spec )
output( "\n\t%s\n", get_asm_string_section() );
output( "%s\n", asm_globl("__wine_spec_file_name") );
- output( ".L__wine_spec_file_name:\n" );
output( "\t%s \"%s\"\n", get_asm_string_keyword(), spec->file_name );
if (target_platform == PLATFORM_APPLE)
output( "\t.lcomm %s,4\n", asm_name("_end") );
More information about the wine-cvs
mailing list