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
83fc7339
Commit
83fc7339
authored
Jan 06, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Implement dumping of relocations.
parent
d6617258
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
3 deletions
+46
-3
pe.c
tools/winedump/pe.c
+46
-3
No files found.
tools/winedump/pe.c
View file @
83fc7339
...
...
@@ -803,6 +803,52 @@ static void dump_dir_clr_header(void)
printf
(
"
\n
"
);
}
static
void
dump_dir_reloc
(
void
)
{
unsigned
int
i
,
size
=
0
;
const
USHORT
*
relocs
;
const
IMAGE_BASE_RELOCATION
*
rel
=
get_dir_and_size
(
IMAGE_DIRECTORY_ENTRY_BASERELOC
,
&
size
);
const
IMAGE_BASE_RELOCATION
*
end
=
(
IMAGE_BASE_RELOCATION
*
)((
char
*
)
rel
+
size
);
static
const
char
*
const
names
[]
=
{
"BASED_ABSOLUTE"
,
"BASED_HIGH"
,
"BASED_LOW"
,
"BASED_HIGHLOW"
,
"BASED_HIGHADJ"
,
"BASED_MIPS_JMPADDR"
,
"BASED_SECTION"
,
"BASED_REL"
,
"unknown 8"
,
"BASED_IA64_IMM64"
,
"BASED_DIR64"
,
"BASED_HIGH3ADJ"
,
"unknown 12"
,
"unknown 13"
,
"unknown 14"
,
"unknown 15"
};
if
(
!
rel
)
return
;
printf
(
"Relocations
\n
"
);
while
(
rel
<
end
-
1
&&
rel
->
SizeOfBlock
)
{
printf
(
" Page %x
\n
"
,
rel
->
VirtualAddress
);
relocs
=
(
const
USHORT
*
)(
rel
+
1
);
i
=
(
rel
->
SizeOfBlock
-
sizeof
(
*
rel
))
/
sizeof
(
USHORT
);
while
(
i
--
)
{
USHORT
offset
=
*
relocs
&
0xfff
;
int
type
=
*
relocs
>>
12
;
printf
(
" off %04x type %s
\n
"
,
offset
,
names
[
type
]
);
relocs
++
;
}
rel
=
(
const
IMAGE_BASE_RELOCATION
*
)
relocs
;
}
printf
(
"
\n
"
);
}
static
void
dump_dir_tls
(
void
)
{
IMAGE_TLS_DIRECTORY64
dir
;
...
...
@@ -1247,11 +1293,8 @@ void pe_dump(void)
dump_dir_tls
();
if
(
all
||
!
strcmp
(
globals
.
dumpsect
,
"clr"
))
dump_dir_clr_header
();
#if 0
/* FIXME: not implemented yet */
if
(
all
||
!
strcmp
(
globals
.
dumpsect
,
"reloc"
))
dump_dir_reloc
();
#endif
}
if
(
globals
.
do_debug
)
dump_debug
();
...
...
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