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
074ec584
Commit
074ec584
authored
Mar 20, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Set the import hint based on the name index.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d6acb0ed
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
build.h
tools/winebuild/build.h
+1
-0
import.c
tools/winebuild/import.c
+8
-5
parser.c
tools/winebuild/parser.c
+1
-0
No files found.
tools/winebuild/build.h
View file @
074ec584
...
...
@@ -98,6 +98,7 @@ typedef struct
{
ORD_TYPE
type
;
int
ordinal
;
int
hint
;
int
lineno
;
int
flags
;
char
*
name
;
/* public name of this function */
...
...
tools/winebuild/import.c
View file @
074ec584
...
...
@@ -43,6 +43,7 @@ struct import_func
const
char
*
name
;
const
char
*
export_name
;
int
ordinal
;
int
hint
;
};
struct
import
...
...
@@ -332,7 +333,8 @@ struct import *add_static_import_dll( const char *name )
}
/* add a function to the list of imports from a given dll */
static
void
add_import_func
(
struct
import
*
imp
,
const
char
*
name
,
const
char
*
export_name
,
int
ordinal
)
static
void
add_import_func
(
struct
import
*
imp
,
const
char
*
name
,
const
char
*
export_name
,
int
ordinal
,
int
hint
)
{
if
(
imp
->
nb_imports
==
imp
->
max_imports
)
{
...
...
@@ -343,6 +345,7 @@ static void add_import_func( struct import *imp, const char *name, const char *e
imp
->
imports
[
imp
->
nb_imports
].
name
=
name
;
imp
->
imports
[
imp
->
nb_imports
].
export_name
=
export_name
;
imp
->
imports
[
imp
->
nb_imports
].
ordinal
=
ordinal
;
imp
->
imports
[
imp
->
nb_imports
].
hint
=
hint
;
imp
->
nb_imports
++
;
}
...
...
@@ -361,9 +364,9 @@ static void add_undef_import( const char *name, int is_ordinal )
import
=
add_static_import_dll
(
dll_name
);
if
(
is_ordinal
)
add_import_func
(
import
,
NULL
,
xstrdup
(
p
),
ordinal
);
add_import_func
(
import
,
NULL
,
xstrdup
(
p
),
ordinal
,
0
);
else
add_import_func
(
import
,
xstrdup
(
p
),
NULL
,
ordinal
);
add_import_func
(
import
,
xstrdup
(
p
),
NULL
,
ordinal
,
0
);
}
/* get the default entry point for a given spec file */
...
...
@@ -587,7 +590,7 @@ void resolve_dll_imports( DLLSPEC *spec, struct list *list )
else
{
add_import_func
(
imp
,
(
odp
->
flags
&
FLAG_NONAME
)
?
NULL
:
odp
->
name
,
odp
->
export_name
,
odp
->
ordinal
);
odp
->
export_name
,
odp
->
ordinal
,
odp
->
hint
);
remove_name
(
&
undef_symbols
,
j
--
);
}
}
...
...
@@ -769,7 +772,7 @@ static void output_immediate_imports(void)
if
(
!
func
->
name
)
continue
;
output
(
"
\t
.align %d
\n
"
,
get_alignment
(
2
)
);
output
(
".L__wine_spec_import_data_%s_%s:
\n
"
,
import
->
c_name
,
func
->
name
);
output
(
"
\t
.short %d
\n
"
,
func
->
ordinal
);
output
(
"
\t
.short %d
\n
"
,
func
->
hint
);
output
(
"
\t
%s
\"
%s
\"\n
"
,
get_asm_string_keyword
(),
func
->
name
);
}
}
...
...
tools/winebuild/parser.c
View file @
074ec584
...
...
@@ -756,6 +756,7 @@ static void assign_names( DLLSPEC *spec )
/* sort the list of names */
qsort
(
spec
->
names
,
spec
->
nb_names
,
sizeof
(
spec
->
names
[
0
]),
name_compare
);
for
(
i
=
0
;
i
<
spec
->
nb_names
;
i
++
)
spec
->
names
[
i
]
->
hint
=
i
;
}
}
...
...
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