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
a6f0fe8d
Commit
a6f0fe8d
authored
Mar 31, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 31, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Use local elf_section_header declaration.
Based on glibc. Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
78845911
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
6 deletions
+30
-6
elf_module.c
dlls/dbghelp/elf_module.c
+15
-3
image_private.h
dlls/dbghelp/image_private.h
+15
-3
No files found.
dlls/dbghelp/elf_module.c
View file @
a6f0fe8d
...
...
@@ -322,10 +322,22 @@ static BOOL elf_map_shdr(struct elf_map_file_data* emfd, struct image_file_map*
{
if
(
fmap
->
addr_size
==
32
)
{
Elf32_Shdr
shdr32
;
struct
{
UINT32
sh_name
;
/* Section name (string tbl index) */
UINT32
sh_type
;
/* Section type */
UINT32
sh_flags
;
/* Section flags */
UINT32
sh_addr
;
/* Section virtual addr at execution */
UINT32
sh_offset
;
/* Section file offset */
UINT32
sh_size
;
/* Section size in bytes */
UINT32
sh_link
;
/* Link to another section */
UINT32
sh_info
;
/* Additional section information */
UINT32
sh_addralign
;
/* Section alignment */
UINT32
sh_entsize
;
/* Entry size if section holds table */
}
shdr32
;
if
(
!
elf_map_file_read
(
fmap
,
emfd
,
&
shdr32
,
sizeof
(
shdr32
),
fmap
->
u
.
elf
.
elfhdr
.
e_shoff
+
i
*
sizeof
(
Elf32_Shdr
)))
fmap
->
u
.
elf
.
elfhdr
.
e_shoff
+
i
*
sizeof
(
shdr32
)))
return
FALSE
;
fmap
->
u
.
elf
.
sect
[
i
].
shdr
.
sh_name
=
shdr32
.
sh_name
;
...
...
@@ -342,7 +354,7 @@ static BOOL elf_map_shdr(struct elf_map_file_data* emfd, struct image_file_map*
else
{
if
(
!
elf_map_file_read
(
fmap
,
emfd
,
&
fmap
->
u
.
elf
.
sect
[
i
].
shdr
,
sizeof
(
fmap
->
u
.
elf
.
sect
[
i
].
shdr
),
fmap
->
u
.
elf
.
elfhdr
.
e_shoff
+
i
*
sizeof
(
Elf64_S
hdr
)))
fmap
->
u
.
elf
.
elfhdr
.
e_shoff
+
i
*
sizeof
(
fmap
->
u
.
elf
.
sect
[
i
].
s
hdr
)))
return
FALSE
;
}
return
TRUE
;
...
...
dlls/dbghelp/image_private.h
View file @
a6f0fe8d
...
...
@@ -66,6 +66,20 @@ struct elf_header
UINT16
e_shstrndx
;
/* Section header string table index */
};
struct
elf_section_header
{
UINT32
sh_name
;
/* Section name (string tbl index) */
UINT32
sh_type
;
/* Section type */
UINT64
sh_flags
;
/* Section flags */
UINT64
sh_addr
;
/* Section virtual addr at execution */
UINT64
sh_offset
;
/* Section file offset */
UINT64
sh_size
;
/* Section size in bytes */
UINT32
sh_link
;
/* Link to another section */
UINT32
sh_info
;
/* Additional section information */
UINT64
sh_addralign
;
/* Section alignment */
UINT64
sh_entsize
;
/* Entry size if section holds table */
};
/* structure holding information while handling an ELF image
* allows one by one section mapping for memory savings
*/
...
...
@@ -85,13 +99,11 @@ struct image_file_map
const
char
*
shstrtab
;
char
*
target_copy
;
struct
elf_header
elfhdr
;
#ifdef __ELF__
struct
{
Elf64_Shdr
shdr
;
struct
elf_section_header
shdr
;
const
char
*
mapped
;
}
*
sect
;
#endif
}
elf
;
struct
macho_file_map
{
...
...
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