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
6ee05835
Commit
6ee05835
authored
Feb 14, 2024
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 15, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Use exports struct for 16-bit modules handlign.
parent
499c6be7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
18 deletions
+19
-18
spec16.c
tools/winebuild/spec16.c
+19
-18
No files found.
tools/winebuild/spec16.c
View file @
6ee05835
...
...
@@ -103,7 +103,7 @@ static void output_entries( DLLSPEC *spec, int first, int count )
for
(
i
=
0
;
i
<
count
;
i
++
)
{
ORDDEF
*
odp
=
spec
->
ordinals
[
first
+
i
];
ORDDEF
*
odp
=
spec
->
exports
.
ordinals
[
first
+
i
];
output
(
"
\t
.byte 0x03
\n
"
);
/* flags: exported & public data */
switch
(
odp
->
type
)
{
...
...
@@ -134,10 +134,10 @@ static void output_entry_table( DLLSPEC *spec )
{
int
i
,
prev
=
0
,
prev_sel
=
-
1
,
bundle_count
=
0
;
for
(
i
=
1
;
i
<=
spec
->
limit
;
i
++
)
for
(
i
=
1
;
i
<=
spec
->
exports
.
limit
;
i
++
)
{
int
selector
=
0
;
ORDDEF
*
odp
=
spec
->
ordinals
[
i
];
ORDDEF
*
odp
=
spec
->
exports
.
ordinals
[
i
];
if
(
!
odp
)
continue
;
if
(
odp
->
flags
&
FLAG_EXPORT32
)
continue
;
...
...
@@ -499,17 +499,18 @@ static int relay_type_compare( const void *e1, const void *e2 )
*/
static
void
output_module16
(
DLLSPEC
*
spec
)
{
struct
exports
*
exports
=
&
spec
->
exports
;
ORDDEF
**
typelist
;
ORDDEF
*
entry_point
=
NULL
;
int
i
,
j
,
nb_funcs
;
/* store the main entry point as ordinal 0 */
if
(
!
spec
->
ordinals
)
if
(
!
exports
->
ordinals
)
{
assert
(
spec
->
limit
==
0
);
spec
->
ordinals
=
xmalloc
(
sizeof
(
spec
->
ordinals
[
0
])
);
spec
->
ordinals
[
0
]
=
NULL
;
assert
(
exports
->
limit
==
0
);
exports
->
ordinals
=
xmalloc
(
sizeof
(
exports
->
ordinals
[
0
])
);
exports
->
ordinals
[
0
]
=
NULL
;
}
if
(
spec
->
init_func
&&
!
(
spec
->
characteristics
&
IMAGE_FILE_DLL
))
{
...
...
@@ -522,17 +523,17 @@ static void output_module16( DLLSPEC *spec )
entry_point
->
link_name
=
xstrdup
(
spec
->
init_func
);
entry_point
->
export_name
=
NULL
;
entry_point
->
u
.
func
.
nb_args
=
0
;
assert
(
!
spec
->
ordinals
[
0
]
);
spec
->
ordinals
[
0
]
=
entry_point
;
assert
(
!
exports
->
ordinals
[
0
]
);
exports
->
ordinals
[
0
]
=
entry_point
;
}
/* Build sorted list of all argument types, without duplicates */
typelist
=
xmalloc
(
(
spec
->
limit
+
1
)
*
sizeof
(
*
typelist
)
);
typelist
=
xmalloc
(
(
exports
->
limit
+
1
)
*
sizeof
(
*
typelist
)
);
for
(
i
=
nb_funcs
=
0
;
i
<=
spec
->
limit
;
i
++
)
for
(
i
=
nb_funcs
=
0
;
i
<=
exports
->
limit
;
i
++
)
{
ORDDEF
*
odp
=
spec
->
ordinals
[
i
];
ORDDEF
*
odp
=
exports
->
ordinals
[
i
];
if
(
!
odp
)
continue
;
if
(
is_function
(
odp
))
typelist
[
nb_funcs
++
]
=
odp
;
}
...
...
@@ -629,9 +630,9 @@ static void output_module16( DLLSPEC *spec )
output
(
"
\n\t
.balign 2
\n
"
);
output
(
".L__wine_spec_ne_restab:
\n
"
);
output_resident_name
(
spec
->
dll_name
,
0
);
for
(
i
=
1
;
i
<=
spec
->
limit
;
i
++
)
for
(
i
=
1
;
i
<=
exports
->
limit
;
i
++
)
{
ORDDEF
*
odp
=
spec
->
ordinals
[
i
];
ORDDEF
*
odp
=
exports
->
ordinals
[
i
];
if
(
!
odp
||
!
odp
->
name
[
0
])
continue
;
if
(
odp
->
flags
&
FLAG_EXPORT32
)
continue
;
output_resident_name
(
odp
->
name
,
i
);
...
...
@@ -729,9 +730,9 @@ static void output_module16( DLLSPEC *spec )
output
(
"
\t
.long 0x%08x,0x%08x
\n
"
,
arg_types
[
0
],
arg_types
[
1
]
);
}
for
(
i
=
0
;
i
<=
spec
->
limit
;
i
++
)
for
(
i
=
0
;
i
<=
exports
->
limit
;
i
++
)
{
ORDDEF
*
odp
=
spec
->
ordinals
[
i
];
ORDDEF
*
odp
=
exports
->
ordinals
[
i
];
if
(
!
odp
||
!
is_function
(
odp
))
continue
;
output
(
".L__wine_%s_%u:
\n
"
,
spec
->
c_name
,
i
);
output
(
"
\t
pushw %%bp
\n
"
);
...
...
@@ -745,9 +746,9 @@ static void output_module16( DLLSPEC *spec )
output
(
"
\n
.L__wine_spec_data_segment:
\n
"
);
output
(
"
\t
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
\n
"
);
/* instance data */
for
(
i
=
0
;
i
<=
spec
->
limit
;
i
++
)
for
(
i
=
0
;
i
<=
exports
->
limit
;
i
++
)
{
ORDDEF
*
odp
=
spec
->
ordinals
[
i
];
ORDDEF
*
odp
=
exports
->
ordinals
[
i
];
if
(
!
odp
||
odp
->
type
!=
TYPE_VARIABLE
)
continue
;
output
(
".L__wine_%s_%u:
\n
"
,
spec
->
c_name
,
i
);
output
(
"
\t
.long "
);
...
...
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