Commit 1abf8090 authored by Alexandre Julliard's avatar Alexandre Julliard

winebuild: Generate MS-style imports using the OriginalFirstThunk field.

parent 4eb350b8
......@@ -746,7 +746,8 @@ static void output_immediate_imports(void)
{
if (dll_imports[i]->delay) continue;
dll_name = make_c_identifier( dll_imports[i]->spec->file_name );
output( "\t.long 0\n" ); /* OriginalFirstThunk */
output( "\t.long .L__wine_spec_import_data_names+%d-.L__wine_spec_rva_base\n", /* OriginalFirstThunk */
j * get_ptr_size() );
output( "\t.long 0\n" ); /* TimeDateStamp */
output( "\t.long 0\n" ); /* ForwarderChain */
output( "\t.long .L__wine_spec_import_name_%s-.L__wine_spec_rva_base\n", /* Name */
......@@ -762,7 +763,7 @@ static void output_immediate_imports(void)
output( "\t.long 0\n" ); /* FirstThunk */
output( "\n\t.align %d\n", get_alignment(get_ptr_size()) );
output( ".L__wine_spec_import_data_ptrs:\n" );
output( ".L__wine_spec_import_data_names:\n" );
for (i = 0; i < nb_imports; i++)
{
if (dll_imports[i]->delay) continue;
......@@ -783,6 +784,13 @@ static void output_immediate_imports(void)
}
output( "\t%s 0\n", get_asm_ptr_keyword() );
}
output( ".L__wine_spec_import_data_ptrs:\n" );
for (i = 0; i < nb_imports; i++)
{
if (dll_imports[i]->delay) continue;
for (j = 0; j < dll_imports[i]->nb_imports; j++) output( "\t%s 0\n", get_asm_ptr_keyword() );
output( "\t%s 0\n", get_asm_ptr_keyword() );
}
output( ".L__wine_spec_imports_end:\n" );
for (i = 0; i < nb_imports; i++)
......
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