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
799e0bfa
Commit
799e0bfa
authored
May 31, 2018
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Translate the 32-bit ELF header to the 64-bit one.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a612f1f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
5 deletions
+28
-5
elf_module.c
dlls/dbghelp/elf_module.c
+27
-2
image_private.h
dlls/dbghelp/image_private.h
+1
-3
No files found.
dlls/dbghelp/elf_module.c
View file @
799e0bfa
...
...
@@ -351,8 +351,33 @@ static BOOL elf_map_file(struct elf_map_file_data* emfd, struct image_file_map*
fmap
->
addr_size
=
e_ident
[
EI_CLASS
]
==
ELFCLASS64
?
64
:
32
;
if
(
!
elf_map_file_read
(
fmap
,
emfd
,
&
fmap
->
u
.
elf
.
elfhdr
,
sizeof
(
fmap
->
u
.
elf
.
elfhdr
),
0
))
goto
done
;
if
(
fmap
->
addr_size
==
32
)
{
Elf32_Ehdr
elfhdr32
;
if
(
!
elf_map_file_read
(
fmap
,
emfd
,
&
elfhdr32
,
sizeof
(
elfhdr32
),
0
))
goto
done
;
memcpy
(
fmap
->
u
.
elf
.
elfhdr
.
e_ident
,
elfhdr32
.
e_ident
,
EI_NIDENT
);
fmap
->
u
.
elf
.
elfhdr
.
e_type
=
elfhdr32
.
e_type
;
fmap
->
u
.
elf
.
elfhdr
.
e_machine
=
elfhdr32
.
e_machine
;
fmap
->
u
.
elf
.
elfhdr
.
e_version
=
elfhdr32
.
e_version
;
fmap
->
u
.
elf
.
elfhdr
.
e_entry
=
elfhdr32
.
e_entry
;
fmap
->
u
.
elf
.
elfhdr
.
e_phoff
=
elfhdr32
.
e_phoff
;
fmap
->
u
.
elf
.
elfhdr
.
e_shoff
=
elfhdr32
.
e_shoff
;
fmap
->
u
.
elf
.
elfhdr
.
e_flags
=
elfhdr32
.
e_flags
;
fmap
->
u
.
elf
.
elfhdr
.
e_ehsize
=
elfhdr32
.
e_ehsize
;
fmap
->
u
.
elf
.
elfhdr
.
e_phentsize
=
elfhdr32
.
e_phentsize
;
fmap
->
u
.
elf
.
elfhdr
.
e_phnum
=
elfhdr32
.
e_phnum
;
fmap
->
u
.
elf
.
elfhdr
.
e_shentsize
=
elfhdr32
.
e_shentsize
;
fmap
->
u
.
elf
.
elfhdr
.
e_shnum
=
elfhdr32
.
e_shnum
;
fmap
->
u
.
elf
.
elfhdr
.
e_shstrndx
=
elfhdr32
.
e_shstrndx
;
}
else
{
if
(
!
elf_map_file_read
(
fmap
,
emfd
,
&
fmap
->
u
.
elf
.
elfhdr
,
sizeof
(
fmap
->
u
.
elf
.
elfhdr
),
0
))
goto
done
;
}
fmap
->
u
.
elf
.
sect
=
HeapAlloc
(
GetProcessHeap
(),
0
,
fmap
->
u
.
elf
.
elfhdr
.
e_shnum
*
sizeof
(
fmap
->
u
.
elf
.
sect
[
0
]));
...
...
dlls/dbghelp/image_private.h
View file @
799e0bfa
...
...
@@ -59,14 +59,12 @@ typedef struct section macho_section;
#ifdef __ELF__
#ifdef _WIN64
#define Elf_Ehdr Elf64_Ehdr
#define Elf_Shdr Elf64_Shdr
#define Elf_Phdr Elf64_Phdr
#define Elf_Dyn Elf64_Dyn
#define Elf_Sym Elf64_Sym
#define Elf_auxv_t Elf64_auxv_t
#else
#define Elf_Ehdr Elf32_Ehdr
#define Elf_Shdr Elf32_Shdr
#define Elf_Phdr Elf32_Phdr
#define Elf_Dyn Elf32_Dyn
...
...
@@ -97,7 +95,7 @@ struct image_file_map
struct
image_file_map
*
alternate
;
/* another ELF file (linked to this one) */
char
*
target_copy
;
#ifdef __ELF__
Elf
_Ehdr
elfhdr
;
Elf
64_Ehdr
elfhdr
;
struct
{
Elf_Shdr
shdr
;
...
...
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