Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
e4b9a501
Commit
e4b9a501
authored
Mar 12, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Support generating a .spec.o file for Windows platforms.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7cb188fd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
5 deletions
+31
-5
build.h
tools/winebuild/build.h
+1
-0
main.c
tools/winebuild/main.c
+2
-1
res32.c
tools/winebuild/res32.c
+6
-3
spec32.c
tools/winebuild/spec32.c
+22
-1
No files found.
tools/winebuild/build.h
View file @
e4b9a501
...
...
@@ -303,6 +303,7 @@ extern int load_res32_file( const char *name, DLLSPEC *spec );
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_pe_module
(
DLLSPEC
*
spec
);
extern
void
output_fake_module
(
DLLSPEC
*
spec
);
extern
void
output_def_file
(
DLLSPEC
*
spec
,
int
include_private
);
extern
void
load_res16_file
(
const
char
*
name
,
DLLSPEC
*
spec
);
...
...
tools/winebuild/main.c
View file @
e4b9a501
...
...
@@ -645,7 +645,8 @@ int main(int argc, char **argv)
output_spec16_file
(
spec
);
break
;
case
SPEC_WIN32
:
output_spec32_file
(
spec
);
if
(
target_platform
==
PLATFORM_WINDOWS
)
output_pe_module
(
spec
);
else
output_spec32_file
(
spec
);
break
;
default:
assert
(
0
);
}
...
...
tools/winebuild/res32.c
View file @
e4b9a501
...
...
@@ -441,7 +441,7 @@ void output_resources( DLLSPEC *spec )
/* output the resource directories */
output
(
"
\n
/* resources */
\n\n
"
);
output
(
"
\t
.
data
\n
"
);
output
(
"
\t
.
section %s
\n
"
,
target_platform
==
PLATFORM_WINDOWS
?
".rsrc"
:
".data
"
);
output
(
"
\t
.align %d
\n
"
,
get_alignment
(
get_ptr_size
())
);
output
(
".L__wine_spec_resources:
\n
"
);
...
...
@@ -498,9 +498,12 @@ void output_resources( DLLSPEC *spec )
output
(
".L__wine_spec_res_%d:
\n
"
,
i
);
dump_res_data
(
res
);
}
output
(
".L__wine_spec_resources_end:
\n
"
);
output
(
"
\t
.byte 0
\n
"
);
if
(
target_platform
!=
PLATFORM_WINDOWS
)
{
output
(
".L__wine_spec_resources_end:
\n
"
);
output
(
"
\t
.byte 0
\n
"
);
}
free_resource_tree
(
tree
);
}
...
...
tools/winebuild/spec32.c
View file @
e4b9a501
...
...
@@ -384,7 +384,7 @@ void output_exports( DLLSPEC *spec )
if
(
!
nr_exports
)
return
;
output
(
"
\n
/* export table */
\n\n
"
);
output
(
"
\t
.
data
\n
"
);
output
(
"
\t
.
section %s
\n
"
,
target_platform
==
PLATFORM_WINDOWS
?
".edata"
:
".data
"
);
output
(
"
\t
.align %d
\n
"
,
get_alignment
(
4
)
);
output
(
".L__wine_spec_exports:
\n
"
);
...
...
@@ -492,6 +492,9 @@ void output_exports( DLLSPEC *spec )
output
(
"
\t
%s
\"
%s
\"\n
"
,
get_asm_string_keyword
(),
odp
->
link_name
);
}
}
if
(
target_platform
==
PLATFORM_WINDOWS
)
return
;
output
(
"
\t
.align %d
\n
"
,
get_alignment
(
get_ptr_size
())
);
output
(
".L__wine_spec_exports_end:
\n
"
);
...
...
@@ -708,6 +711,24 @@ void output_spec32_file( DLLSPEC *spec )
/*******************************************************************
* output_pe_module
*
* Build a PE from a spec file.
*/
void
output_pe_module
(
DLLSPEC
*
spec
)
{
UsePIC
=
0
;
resolve_imports
(
spec
);
open_output_file
();
output_standard_file_header
();
output_stubs
(
spec
);
output_exports
(
spec
);
output_resources
(
spec
);
close_output_file
();
}
/*******************************************************************
* output_fake_module
*
* Build a fake binary module from a spec file.
...
...
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