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
445047a9
Commit
445047a9
authored
Feb 24, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Make the 16-bit DOS header a local symbol.
parent
728d87d0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
19 deletions
+17
-19
build.h
tools/winebuild/build.h
+1
-1
res16.c
tools/winebuild/res16.c
+3
-3
spec16.c
tools/winebuild/spec16.c
+13
-15
No files found.
tools/winebuild/build.h
View file @
445047a9
...
...
@@ -213,7 +213,7 @@ extern int load_res32_file( const char *name, DLLSPEC *spec );
extern
void
output_resources
(
DLLSPEC
*
spec
);
extern
void
load_res16_file
(
const
char
*
name
,
DLLSPEC
*
spec
);
extern
void
output_res16_data
(
DLLSPEC
*
spec
);
extern
void
output_res16_directory
(
DLLSPEC
*
spec
,
const
char
*
header_name
);
extern
void
output_res16_directory
(
DLLSPEC
*
spec
);
extern
void
BuildRelays16
(
void
);
extern
void
BuildRelays32
(
void
);
...
...
tools/winebuild/res16.c
View file @
445047a9
...
...
@@ -267,7 +267,7 @@ void output_res16_data( DLLSPEC *spec )
}
/* output the resource definitions */
void
output_res16_directory
(
DLLSPEC
*
spec
,
const
char
*
header_name
)
void
output_res16_directory
(
DLLSPEC
*
spec
)
{
unsigned
int
i
,
j
;
struct
res_tree
*
tree
;
...
...
@@ -293,8 +293,8 @@ void output_res16_directory( DLLSPEC *spec, const char *header_name )
for
(
j
=
0
,
res
=
type
->
res
;
j
<
type
->
nb_names
;
j
++
,
res
++
)
{
output
(
"
\t
%s .L__wine_spec_resource_%lu-
%s
\n
"
,
get_asm_short_keyword
(),
(
unsigned
long
)(
res
-
spec
->
resources
)
,
header_name
);
output
(
"
\t
%s .L__wine_spec_resource_%lu-
.L__wine_spec_dos_header
\n
"
,
get_asm_short_keyword
(),
(
unsigned
long
)(
res
-
spec
->
resources
)
);
output
(
"
\t
%s .L__wine_spec_resource_%lu_end-.L__wine_spec_resource_%lu
\n
"
,
get_asm_short_keyword
(),
(
unsigned
long
)(
res
-
spec
->
resources
),
(
unsigned
long
)(
res
-
spec
->
resources
)
);
...
...
tools/winebuild/spec16.c
View file @
445047a9
...
...
@@ -451,7 +451,7 @@ static int sort_func_list( ORDDEF **list, int count,
*
* Output the dll initialization code.
*/
static
void
output_init_code
(
const
DLLSPEC
*
spec
,
const
char
*
header_name
)
static
void
output_init_code
(
const
DLLSPEC
*
spec
)
{
char
name
[
80
];
...
...
@@ -468,13 +468,13 @@ static void output_init_code( const DLLSPEC *spec, const char *header_name )
output
(
"
\t
call %s
\n
"
,
asm_name
(
"__wine_spec_get_pc_thunk_eax"
)
);
output
(
"1:
\t
leal .L__wine_spec_file_name-1b(%%eax),%%ecx
\n
"
);
output
(
"
\t
pushl %%ecx
\n
"
);
output
(
"
\t
leal
%s-1b(%%eax),%%ecx
\n
"
,
header_name
);
output
(
"
\t
leal
.L__wine_spec_dos_header-1b(%%eax),%%ecx
\n
"
);
output
(
"
\t
pushl %%ecx
\n
"
);
}
else
{
output
(
"
\t
pushl $.L__wine_spec_file_name
\n
"
);
output
(
"
\t
pushl $
%s
\n
"
,
header_name
);
output
(
"
\t
pushl $
.L__wine_spec_dos_header
\n
"
);
}
output
(
"
\t
call %s
\n
"
,
asm_name
(
"__wine_dll_register_16"
)
);
output
(
"
\t
addl $12,%%esp
\n
"
);
...
...
@@ -490,12 +490,12 @@ static void output_init_code( const DLLSPEC *spec, const char *header_name )
if
(
UsePIC
)
{
output
(
"
\t
call %s
\n
"
,
asm_name
(
"__wine_spec_get_pc_thunk_eax"
)
);
output
(
"1:
\t
leal
%s-1b(%%eax),%%ecx
\n
"
,
header_name
);
output
(
"1:
\t
leal
.L__wine_spec_dos_header-1b(%%eax),%%ecx
\n
"
);
output
(
"
\t
pushl %%ecx
\n
"
);
}
else
{
output
(
"
\t
pushl $
%s
\n
"
,
header_name
);
output
(
"
\t
pushl $
.L__wine_spec_dos_header
\n
"
);
}
output
(
"
\t
call %s
\n
"
,
asm_name
(
"__wine_dll_unregister_16"
)
);
output
(
"
\t
addl $12,%%esp
\n
"
);
...
...
@@ -531,7 +531,6 @@ void BuildSpec16File( DLLSPEC *spec )
ORDDEF
**
typelist
;
ORDDEF
*
entry_point
=
NULL
;
int
i
,
j
,
nb_funcs
;
char
header_name
[
256
];
/* File header */
...
...
@@ -587,11 +586,10 @@ void BuildSpec16File( DLLSPEC *spec )
/* Output the module structure */
sprintf
(
header_name
,
"__wine_spec_%s_dos_header"
,
make_c_identifier
(
spec
->
dll_name
)
);
output
(
"
\n
/* module data */
\n\n
"
);
output
(
"
\t
.data
\n
"
);
output
(
"
\t
.align %d
\n
"
,
get_alignment
(
4
)
);
output
(
"
%s:
\n
"
,
header_name
);
output
(
"
.L__wine_spec_dos_header:
\n
"
);
output
(
"
\t
%s 0x%04x
\n
"
,
get_asm_short_keyword
(),
/* e_magic */
IMAGE_DOS_SIGNATURE
);
output
(
"
\t
%s 0
\n
"
,
get_asm_short_keyword
()
);
/* e_cblp */
...
...
@@ -611,7 +609,7 @@ void BuildSpec16File( DLLSPEC *spec )
output
(
"
\t
%s 0
\n
"
,
get_asm_short_keyword
()
);
/* e_oemid */
output
(
"
\t
%s 0
\n
"
,
get_asm_short_keyword
()
);
/* e_oeminfo */
output
(
"
\t
%s 0,0,0,0,0,0,0,0,0,0
\n
"
,
get_asm_short_keyword
()
);
/* e_res2 */
output
(
"
\t
.long .L__wine_spec_ne_header-
%s
\n
"
,
header_name
);
/* e_lfanew */
output
(
"
\t
.long .L__wine_spec_ne_header-
.L__wine_spec_dos_header
\n
"
);
/* e_lfanew */
output
(
".L__wine_spec_ne_header:
\n
"
);
output
(
"
\t
%s 0x%04x
\n
"
,
get_asm_short_keyword
(),
/* ne_magic */
...
...
@@ -663,8 +661,8 @@ void BuildSpec16File( DLLSPEC *spec )
/* code segment entry */
output
(
"
\t
%s .L__wine_spec_code_segment-
%s
\n
"
,
/* filepos */
get_asm_short_keyword
()
,
header_name
);
output
(
"
\t
%s .L__wine_spec_code_segment-
.L__wine_spec_dos_header
\n
"
,
/* filepos */
get_asm_short_keyword
()
);
output
(
"
\t
%s .L__wine_spec_code_segment_end-.L__wine_spec_code_segment
\n
"
,
/* size */
get_asm_short_keyword
()
);
output
(
"
\t
%s 0x%04x
\n
"
,
get_asm_short_keyword
(),
NE_SEGFLAGS_32BIT
);
/* flags */
...
...
@@ -673,8 +671,8 @@ void BuildSpec16File( DLLSPEC *spec )
/* data segment entry */
output
(
"
\t
%s .L__wine_spec_data_segment-
%s
\n
"
,
/* filepos */
get_asm_short_keyword
()
,
header_name
);
output
(
"
\t
%s .L__wine_spec_data_segment-
.L__wine_spec_dos_header
\n
"
,
/* filepos */
get_asm_short_keyword
()
);
output
(
"
\t
%s .L__wine_spec_data_segment_end-.L__wine_spec_data_segment
\n
"
,
/* size */
get_asm_short_keyword
()
);
output
(
"
\t
%s 0x%04x
\n
"
,
get_asm_short_keyword
(),
NE_SEGFLAGS_DATA
);
/* flags */
...
...
@@ -683,7 +681,7 @@ void BuildSpec16File( DLLSPEC *spec )
/* resource directory */
output_res16_directory
(
spec
,
header_name
);
output_res16_directory
(
spec
);
/* resident names table */
...
...
@@ -835,7 +833,7 @@ void BuildSpec16File( DLLSPEC *spec )
output_stubs
(
spec
);
output_get_pc_thunk
();
output_init_code
(
spec
,
header_name
);
output_init_code
(
spec
);
output_gnu_stack_note
();
free
(
typelist
);
...
...
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