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
f63f8bc2
Commit
f63f8bc2
authored
Nov 01, 1998
by
Marcus Meissner
Committed by
Alexandre Julliard
Nov 01, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detection of the end of imports with Characteristics 0 fail for Borland
programs (which seem to have always characteristics 0). Changed to algorithm to something a bit more intelligent.
parent
fa5f56fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
pe_image.c
loader/pe_image.c
+15
-3
No files found.
loader/pe_image.c
View file @
f63f8bc2
...
...
@@ -220,7 +220,7 @@ DWORD fixup_imports (PDB32 *process,WINE_MODREF *wm)
WINE_MODREF
*
xwm
;
PE_MODREF
*
pem
;
unsigned
int
load_addr
=
wm
->
module
;
int
i
;
int
i
,
characteristics_detection
=
1
;
char
*
modname
;
assert
(
wm
->
type
==
MODULE32_PE
);
...
...
@@ -238,8 +238,17 @@ DWORD fixup_imports (PDB32 *process,WINE_MODREF *wm)
if
(
!
pe_imp
)
ERR
(
win32
,
"no import directory????
\n
"
);
for
(
i
=
0
;
pe_imp
->
Name
&&
pe_imp
->
u
.
Characteristics
;
pe_imp
++
)
/* We assume that we have at least one import with !0 characteristics and
* detect broken imports with all characteristsics 0 (notably Borland) and
* switch the detection off for them.
*/
for
(
i
=
0
;
pe_imp
->
Name
;
pe_imp
++
)
{
if
(
!
i
&&
!
pe_imp
->
u
.
Characteristics
)
characteristics_detection
=
0
;
if
(
characteristics_detection
&&
!
pe_imp
->
u
.
Characteristics
)
break
;
i
++
;
}
/* Allocate module dependency list */
wm
->
nDeps
=
i
;
...
...
@@ -249,12 +258,15 @@ DWORD fixup_imports (PDB32 *process,WINE_MODREF *wm)
* added to the modref list of the process.
*/
for
(
i
=
0
,
pe_imp
=
pem
->
pe_import
;
pe_imp
->
Name
&&
pe_imp
->
u
.
Characteristics
;
pe_imp
++
)
{
for
(
i
=
0
,
pe_imp
=
pem
->
pe_import
;
pe_imp
->
Name
;
pe_imp
++
)
{
HMODULE32
hImpModule
;
IMAGE_IMPORT_BY_NAME
*
pe_name
;
PIMAGE_THUNK_DATA
import_list
,
thunk_list
;
char
*
name
=
(
char
*
)
RVA
(
pe_imp
->
Name
);
if
(
characteristics_detection
&&
!
pe_imp
->
u
.
Characteristics
)
break
;
/* don't use MODULE_Load, Win32 creates new task differently */
hImpModule
=
MODULE_LoadLibraryEx32A
(
name
,
process
,
0
,
0
);
if
(
!
hImpModule
)
{
...
...
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