Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d9a6deff
Commit
d9a6deff
authored
Aug 22, 2013
by
André Hentschel
Committed by
Alexandre Julliard
Sep 09, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Add and use IMAGE_DELAYLOAD_DESCRIPTOR.
parent
4a1d4acd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
18 deletions
+30
-18
winnt.h
include/winnt.h
+22
-0
pe.c
tools/winedump/pe.c
+8
-18
No files found.
include/winnt.h
View file @
d9a6deff
...
...
@@ -3052,6 +3052,28 @@ typedef struct _IMAGE_RELOCATION
#define IMAGE_SIZEOF_RELOCATION 10
typedef
struct
_IMAGE_DELAYLOAD_DESCRIPTOR
{
union
{
DWORD
AllAttributes
;
struct
{
DWORD
RvaBased
:
1
;
DWORD
ReservedAttributes
:
31
;
}
DUMMYSTRUCTNAME
;
}
Attributes
;
DWORD
DllNameRVA
;
DWORD
ModuleHandleRVA
;
DWORD
ImportAddressTableRVA
;
DWORD
ImportNameTableRVA
;
DWORD
BoundImportAddressTableRVA
;
DWORD
UnloadInformationTableRVA
;
DWORD
TimeDateStamp
;
}
IMAGE_DELAYLOAD_DESCRIPTOR
,
*
PIMAGE_DELAYLOAD_DESCRIPTOR
;
typedef
const
IMAGE_DELAYLOAD_DESCRIPTOR
*
PCIMAGE_DELAYLOAD_DESCRIPTOR
;
/* generic relocation types */
#define IMAGE_REL_BASED_ABSOLUTE 0
#define IMAGE_REL_BASED_HIGH 1
...
...
tools/winedump/pe.c
View file @
d9a6deff
...
...
@@ -864,17 +864,7 @@ static void dump_dir_imported_functions(void)
static
void
dump_dir_delay_imported_functions
(
void
)
{
unsigned
directorySize
;
const
struct
ImgDelayDescr
{
DWORD
grAttrs
;
DWORD
szName
;
DWORD
phmod
;
DWORD
pIAT
;
DWORD
pINT
;
DWORD
pBoundIAT
;
DWORD
pUnloadIAT
;
DWORD
dwTimeStamp
;
}
*
importDesc
=
get_dir_and_size
(
IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT
,
&
directorySize
);
const
IMAGE_DELAYLOAD_DESCRIPTOR
*
importDesc
=
get_dir_and_size
(
IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT
,
&
directorySize
);
if
(
!
importDesc
)
return
;
...
...
@@ -883,19 +873,19 @@ static void dump_dir_delay_imported_functions(void)
for
(;;)
{
const
IMAGE_THUNK_DATA32
*
il
;
int
offset
=
(
importDesc
->
grAttr
s
&
1
)
?
0
:
PE_nt_headers
->
OptionalHeader
.
ImageBase
;
int
offset
=
(
importDesc
->
Attributes
.
AllAttribute
s
&
1
)
?
0
:
PE_nt_headers
->
OptionalHeader
.
ImageBase
;
if
(
!
importDesc
->
szName
||
!
importDesc
->
pIAT
||
!
importDesc
->
pINT
)
break
;
if
(
!
importDesc
->
DllNameRVA
||
!
importDesc
->
ImportAddressTableRVA
||
!
importDesc
->
ImportNameTableRVA
)
break
;
printf
(
" grAttrs %08x offset %08lx %s
\n
"
,
importDesc
->
grAttr
s
,
Offset
(
importDesc
),
(
const
char
*
)
RVA
(
importDesc
->
szName
-
offset
,
sizeof
(
DWORD
)));
printf
(
" Hint/Name Table: %08x
\n
"
,
importDesc
->
pINT
);
printf
(
" grAttrs %08x offset %08lx %s
\n
"
,
importDesc
->
Attributes
.
AllAttribute
s
,
Offset
(
importDesc
),
(
const
char
*
)
RVA
(
importDesc
->
DllNameRVA
-
offset
,
sizeof
(
DWORD
)));
printf
(
" Hint/Name Table: %08x
\n
"
,
importDesc
->
ImportNameTableRVA
);
printf
(
" TimeDateStamp: %08X (%s)
\n
"
,
importDesc
->
dwTimeStamp
,
get_time_str
(
importDesc
->
dwTim
eStamp
));
importDesc
->
TimeDateStamp
,
get_time_str
(
importDesc
->
TimeDat
eStamp
));
printf
(
" Ordn Name
\n
"
);
il
=
RVA
(
importDesc
->
pINT
-
offset
,
sizeof
(
DWORD
));
il
=
RVA
(
importDesc
->
ImportNameTableRVA
-
offset
,
sizeof
(
DWORD
));
if
(
!
il
)
printf
(
"Can't grab thunk data, going to next imported DLL
\n
"
);
...
...
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