winebuild: Output the 16-bit asm relay functions as needed and get rid of --relay16 mode.

This commit is contained in:
Alexandre Julliard 2010-01-16 15:58:48 +01:00
parent 10e4a55b6c
commit 539da1b073
6 changed files with 5 additions and 36 deletions

View File

@ -59,11 +59,6 @@ C_SRCS = \
RC_SRCS = version.rc
EXTRA_OBJS = relay16asm.o
@MAKE_DLL_RULES@
relay16asm.o: $(WINEBUILD)
$(WINEBUILD) $(WINEBUILDFLAGS) -o $@ --relay16
@DEPENDENCIES@ # everything below this line is overwritten by make depend

View File

@ -268,9 +268,8 @@ extern void output_spec16_file( DLLSPEC *spec );
extern void output_fake_module16( DLLSPEC *spec16 );
extern void output_res_o_file( DLLSPEC *spec );
extern void output_asm_relays(void);
extern void output_asm_relays16(void);
extern void BuildRelays16(void);
extern void BuildRelays32(void);
extern void BuildSpec32File( DLLSPEC *spec );
extern void add_16bit_exports( DLLSPEC *spec32, DLLSPEC *spec16 );

View File

@ -101,7 +101,6 @@ enum exec_mode_values
MODE_EXE,
MODE_DEF,
MODE_IMPLIB,
MODE_RELAY16,
MODE_RESOURCES
};
@ -269,7 +268,6 @@ static const char usage_str[] =
" --def Build a .def file from a .spec file\n"
" --exe Build a .c file for an executable\n"
" --implib Build an import library\n"
" --relay16 Build the 16-bit relay assembly routines\n"
" --resources Build a .o file for the resource files\n\n"
"The mode options are mutually exclusive; you must specify one and only one.\n\n";
@ -286,7 +284,6 @@ enum long_options_values
LONG_OPT_LDCMD,
LONG_OPT_NMCMD,
LONG_OPT_NXCOMPAT,
LONG_OPT_RELAY16,
LONG_OPT_RESOURCES,
LONG_OPT_SAVE_TEMPS,
LONG_OPT_SUBSYSTEM,
@ -308,7 +305,6 @@ static const struct option long_options[] =
{ "ld-cmd", 1, 0, LONG_OPT_LDCMD },
{ "nm-cmd", 1, 0, LONG_OPT_NMCMD },
{ "nxcompat", 1, 0, LONG_OPT_NXCOMPAT },
{ "relay16", 0, 0, LONG_OPT_RELAY16 },
{ "resources", 0, 0, LONG_OPT_RESOURCES },
{ "save-temps", 0, 0, LONG_OPT_SAVE_TEMPS },
{ "subsystem", 1, 0, LONG_OPT_SUBSYSTEM },
@ -500,9 +496,6 @@ static char **parse_options( int argc, char **argv, DLLSPEC *spec )
if (optarg[0] == 'n' || optarg[0] == 'N')
spec->dll_characteristics &= ~IMAGE_DLLCHARACTERISTICS_NX_COMPAT;
break;
case LONG_OPT_RELAY16:
set_exec_mode( MODE_RELAY16 );
break;
case LONG_OPT_RESOURCES:
set_exec_mode( MODE_RESOURCES );
break;
@ -660,10 +653,6 @@ int main(int argc, char **argv)
if (!parse_input_file( spec )) break;
output_import_lib( spec, argv );
break;
case MODE_RELAY16:
if (argv[0]) fatal_error( "file argument '%s' not allowed in this mode\n", argv[0] );
BuildRelays16();
break;
case MODE_RESOURCES:
load_resources( argv, spec );
output_res_o_file( spec );

View File

@ -903,23 +903,15 @@ static void BuildPendingEventCheck(void)
/*******************************************************************
* BuildRelays16
* output_asm_relays16
*
* Build all the 16-bit relay callbacks
*/
void BuildRelays16(void)
void output_asm_relays16(void)
{
if (target_cpu != CPU_x86)
{
output( "/* File not used with this architecture. Do not edit! */\n\n" );
return;
}
/* File header */
output( "/* File generated automatically. Do not edit! */\n\n" );
output( "\t.text\n" );
output( "%s:\n\n", asm_name("__wine_spec_thunk_text_16") );
output( "%s\n", asm_globl("__wine_call16_start") );
@ -958,14 +950,11 @@ void BuildRelays16(void)
output( "\n\t.data\n\t.align %d\n", get_alignment(4) );
output( "%s\n\t.long 0\n", asm_globl("CallTo16_DataSelector") );
output( "%s\n\t.long 0\n", asm_globl("CallTo16_TebSelector") );
if (UsePIC) output( "wine_ldt_copy_ptr:\t.long %s\n", asm_name("wine_ldt_copy") );
output( "\t.text\n" );
output( "%s:\n\n", asm_name("__wine_spec_thunk_text_32") );
output( "%s:\n", asm_name("__wine_spec_thunk_text_32") );
build_call_from_regs_x86();
output_function_size( "__wine_spec_thunk_text_32" );
output_gnu_stack_note();
}

View File

@ -773,6 +773,7 @@ void output_spec16_file( DLLSPEC *spec16 )
output_stubs( spec16 );
output_exports( spec32 );
output_imports( spec16 );
if (is_undefined( "__wine_call_from_16" )) output_asm_relays16();
if (spec16->main_module)
{
output( "\n\t%s\n", get_asm_string_section() );

View File

@ -50,10 +50,6 @@ Build a .def file from a spec file. The .spec file is specified via the
Build a PE import library from a spec file. The .spec file is
specified via the -E option.
.TP
.B \--relay16
Generate the assembly code for the 16-bit relay routines. This is for
Wine internal usage only, you should never need to use this option.
.TP
.B \--resources
Generate a .o file containing all the input resources. This is useful
when building with a PE compiler, since the PE binutils cannot handle