Commit e4e05cda authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winebuild: Introduce --safeseh option that allows marking assembly files as SEH compatible.

parent 35242aa4
......@@ -364,6 +364,7 @@ extern int link_ext_symbols;
extern int force_pointer_size;
extern int unwind_tables;
extern int unix_lib;
extern int safe_seh;
extern char *input_file_name;
extern char *spec_file_name;
......
......@@ -47,6 +47,7 @@ int link_ext_symbols = 0;
int force_pointer_size = 0;
int unwind_tables = 0;
int unix_lib = 0;
int safe_seh = 0;
#ifdef __i386__
enum target_cpu target_cpu = CPU_x86;
......@@ -290,6 +291,7 @@ static const char usage_str[] =
" -N, --dll-name=DLLNAME Set the DLL name (default: from input file name)\n"
" -o, --output=NAME Set the output file name (default: stdout)\n"
" -r, --res=RSRC.RES Load resources from RSRC.RES\n"
" --safeseh Mark object files as SEH compatible\n"
" --save-temps Do not delete the generated intermediate files\n"
" --subsystem=SUBSYS Set the subsystem (one of native, windows, console, wince)\n"
" -u, --undefined=SYMBOL Add an undefined reference to SYMBOL when linking\n"
......@@ -324,6 +326,7 @@ enum long_options_values
LONG_OPT_NMCMD,
LONG_OPT_NXCOMPAT,
LONG_OPT_RESOURCES,
LONG_OPT_SAFE_SEH,
LONG_OPT_SAVE_TEMPS,
LONG_OPT_STATICLIB,
LONG_OPT_SUBSYSTEM,
......@@ -350,6 +353,7 @@ static const struct option long_options[] =
{ "nm-cmd", 1, 0, LONG_OPT_NMCMD },
{ "nxcompat", 1, 0, LONG_OPT_NXCOMPAT },
{ "resources", 0, 0, LONG_OPT_RESOURCES },
{ "safeseh", 0, 0, LONG_OPT_SAFE_SEH },
{ "save-temps", 0, 0, LONG_OPT_SAVE_TEMPS },
{ "subsystem", 1, 0, LONG_OPT_SUBSYSTEM },
{ "version", 0, 0, LONG_OPT_VERSION },
......@@ -543,6 +547,9 @@ 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_SAFE_SEH:
safe_seh = 1;
break;
case LONG_OPT_RESOURCES:
set_exec_mode( MODE_RESOURCES );
break;
......
......@@ -684,6 +684,12 @@ void output_standard_file_header(void)
else
output( "/* File generated automatically; do not edit! */\n" );
output( "/* This file can be copied, modified and distributed without restriction. */\n\n" );
if (safe_seh)
{
output( "\t.def @feat.00; .scl 3; .type 0; .endef\n" );
output( "\t.globl @feat.00\n" );
output( ".set @feat.00, 1\n" );
}
}
/* dump a byte stream into the assembly code */
......
......@@ -219,6 +219,9 @@ and will automatically be handled correctly (though the
.B \-r
option will also work for Win32 files).
.TP
.B --safeseh
Mark object files as SEH compatible.
.TP
.B --save-temps
Do not delete the various temporary files that \fBwinebuild\fR generates.
.TP
......
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