Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
39f6ab55
Commit
39f6ab55
authored
Feb 16, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Add support for generating data-only DLLs.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3eca3516
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
1 deletion
+26
-1
build.h
tools/winebuild/build.h
+2
-0
main.c
tools/winebuild/main.c
+12
-0
parser.c
tools/winebuild/parser.c
+6
-0
spec32.c
tools/winebuild/spec32.c
+0
-0
utils.c
tools/winebuild/utils.c
+1
-1
winebuild.man.in
tools/winebuild/winebuild.man.in
+5
-0
No files found.
tools/winebuild/build.h
View file @
39f6ab55
...
...
@@ -283,6 +283,7 @@ extern void output_resources( DLLSPEC *spec );
extern
void
output_bin_resources
(
DLLSPEC
*
spec
,
unsigned
int
start_rva
);
extern
void
output_spec32_file
(
DLLSPEC
*
spec
);
extern
void
output_fake_module
(
DLLSPEC
*
spec
);
extern
void
output_data_module
(
DLLSPEC
*
spec
);
extern
void
output_def_file
(
DLLSPEC
*
spec
,
int
import_only
);
extern
void
load_res16_file
(
const
char
*
name
,
DLLSPEC
*
spec
);
extern
void
output_res16_data
(
DLLSPEC
*
spec
);
...
...
@@ -329,6 +330,7 @@ extern int use_msvcrt;
extern
int
unix_lib
;
extern
int
safe_seh
;
extern
int
prefer_native
;
extern
int
data_only
;
extern
char
*
input_file_name
;
extern
char
*
spec_file_name
;
...
...
tools/winebuild/main.c
View file @
39f6ab55
...
...
@@ -46,6 +46,7 @@ int use_msvcrt = 0;
int
unix_lib
=
0
;
int
safe_seh
=
0
;
int
prefer_native
=
0
;
int
data_only
=
0
;
struct
target
target
=
{
0
};
...
...
@@ -198,6 +199,7 @@ static const char usage_str[] =
" -b, --target=TARGET Specify target CPU and platform for cross-compiling
\n
"
" -B PREFIX Look for build tools in the PREFIX directory
\n
"
" --cc-cmd=CC C compiler to use for assembling (default: fall back to --as-cmd)
\n
"
" --data-only Generate a data-only dll (i.e. without any executable code)
\n
"
" -d, --delay-lib=LIB Import the specified library in delayed mode
\n
"
" -D SYM Ignored for C flags compatibility
\n
"
" -e, --entry=FUNC Set the DLL entry point function (default: DllMain)
\n
"
...
...
@@ -251,6 +253,7 @@ enum long_options_values
LONG_OPT_BUILTIN
,
LONG_OPT_ASCMD
,
LONG_OPT_CCCMD
,
LONG_OPT_DATA_ONLY
,
LONG_OPT_EXTERNAL_SYMS
,
LONG_OPT_FAKE_MODULE
,
LONG_OPT_FIXUP_CTORS
,
...
...
@@ -284,6 +287,7 @@ static const struct long_option long_options[] =
/* other long options */
{
"as-cmd"
,
1
,
LONG_OPT_ASCMD
},
{
"cc-cmd"
,
1
,
LONG_OPT_CCCMD
},
{
"data-only"
,
0
,
LONG_OPT_DATA_ONLY
},
{
"external-symbols"
,
0
,
LONG_OPT_EXTERNAL_SYMS
},
{
"fake-module"
,
0
,
LONG_OPT_FAKE_MODULE
},
{
"large-address-aware"
,
0
,
LONG_OPT_LARGE_ADDRESS_AWARE
},
...
...
@@ -483,6 +487,9 @@ static void option_callback( int optc, char *optarg )
case
LONG_OPT_CCCMD
:
cc_command
=
strarray_fromstring
(
optarg
,
" "
);
break
;
case
LONG_OPT_DATA_ONLY
:
data_only
=
1
;
break
;
case
LONG_OPT_FAKE_MODULE
:
fake_module
=
1
;
break
;
...
...
@@ -637,6 +644,11 @@ int main(int argc, char **argv)
output_fake_module
(
spec
);
break
;
}
if
(
data_only
)
{
output_data_module
(
spec
);
break
;
}
if
(
!
is_pe
())
{
files
=
load_import_libs
(
files
);
...
...
tools/winebuild/parser.c
View file @
39f6ab55
...
...
@@ -628,6 +628,12 @@ static int parse_spec_ordinal( int ordinal, DLLSPEC *spec )
return
1
;
}
if
(
data_only
&&
!
(
odp
->
flags
&
FLAG_FORWARD
))
{
error
(
"Only forwarded entry points are allowed in data-only mode
\n
"
);
goto
error
;
}
if
(
ordinal
!=
-
1
)
{
if
(
!
ordinal
)
...
...
tools/winebuild/spec32.c
View file @
39f6ab55
This diff is collapsed.
Click to expand it.
tools/winebuild/utils.c
View file @
39f6ab55
...
...
@@ -644,7 +644,7 @@ DLLSPEC *alloc_dll_spec(void)
spec
->
type
=
SPEC_WIN32
;
spec
->
base
=
MAX_ORDINALS
;
spec
->
characteristics
=
IMAGE_FILE_EXECUTABLE_IMAGE
;
spec
->
subsystem
=
0
;
spec
->
subsystem
=
IMAGE_SUBSYSTEM_WINDOWS_CUI
;
spec
->
subsystem_major
=
4
;
spec
->
subsystem_minor
=
0
;
spec
->
syscall_table
=
0
;
...
...
tools/winebuild/winebuild.man.in
View file @
39f6ab55
...
...
@@ -89,6 +89,11 @@ like \fBas\fR, \fBnm\fR and \fBld\fR.
Specify the C compiler to use to compile assembly files; the default
is to instead use the assembler specified with \fB--as-cmd\fR.
.TP
.B \--data-only
Build a module that contains only data and resources, and no
executable code. With this option, \fBwinebuild\fR directly outputs a
PE file, instead of an assembly or object file.
.TP
.BI \-d,\ --delay-lib= name
Set the delayed import mode for the specified library, which must be
one of the libraries imported with the \fB-l\fR option. Delayed mode
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment