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
620019fd
Commit
620019fd
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 AT_SYSINFO_EHDR definition.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ee34cf36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
14 deletions
+20
-14
elf_module.c
dlls/dbghelp/elf_module.c
+20
-14
No files found.
dlls/dbghelp/elf_module.c
View file @
620019fd
...
...
@@ -124,6 +124,8 @@ struct elf_module_info
struct
image_file_map
file_map
;
};
#define ELF_AT_SYSINFO_EHDR 33
/******************************************************************
* elf_map_section
*
...
...
@@ -1269,7 +1271,6 @@ static BOOL elf_load_file_cb(void *param, HANDLE handle, const WCHAR *filename)
return
elf_load_file
(
load_file
->
process
,
filename
,
load_file
->
load_offset
,
load_file
->
dyn_addr
,
load_file
->
elf_info
);
}
#ifdef AT_SYSINFO_EHDR
/******************************************************************
* elf_search_auxv
*
...
...
@@ -1279,9 +1280,9 @@ static BOOL elf_search_auxv(const struct process* pcs, unsigned type, ULONG_PTR*
{
char
buffer
[
sizeof
(
SYMBOL_INFO
)
+
MAX_SYM_NAME
];
SYMBOL_INFO
*
si
=
(
SYMBOL_INFO
*
)
buffer
;
void
*
addr
;
void
*
str
;
void
*
str_max
;
BYTE
*
addr
;
BYTE
*
str
;
BYTE
*
str_max
;
si
->
SizeOfStruct
=
sizeof
(
*
si
);
si
->
MaxNameLen
=
MAX_SYM_NAME
;
...
...
@@ -1309,36 +1310,43 @@ static BOOL elf_search_auxv(const struct process* pcs, unsigned type, ULONG_PTR*
if
(
pcs
->
is_64bit
)
{
Elf64_auxv_t
auxv
;
struct
{
UINT64
a_type
;
UINT64
a_val
;
}
auxv
;
while
(
ReadProcessMemory
(
pcs
->
handle
,
addr
,
&
auxv
,
sizeof
(
auxv
),
NULL
)
&&
auxv
.
a_type
)
{
if
(
auxv
.
a_type
==
type
)
{
*
val
=
auxv
.
a_
un
.
a_
val
;
*
val
=
auxv
.
a_val
;
return
TRUE
;
}
addr
=
(
void
*
)((
DWORD_PTR
)
addr
+
sizeof
(
auxv
)
);
addr
+=
sizeof
(
auxv
);
}
}
else
{
Elf32_auxv_t
auxv
;
struct
{
UINT32
a_type
;
UINT32
a_val
;
}
auxv
;
while
(
ReadProcessMemory
(
pcs
->
handle
,
addr
,
&
auxv
,
sizeof
(
auxv
),
NULL
)
&&
auxv
.
a_type
)
{
if
(
auxv
.
a_type
==
type
)
{
*
val
=
auxv
.
a_
un
.
a_
val
;
*
val
=
auxv
.
a_val
;
return
TRUE
;
}
addr
=
(
void
*
)((
DWORD_PTR
)
addr
+
sizeof
(
auxv
)
);
addr
+=
sizeof
(
auxv
);
}
}
return
FALSE
;
}
#endif
/******************************************************************
* elf_search_and_load_file
...
...
@@ -1463,18 +1471,16 @@ static BOOL elf_enum_modules_internal(const struct process* pcs,
}
}
#ifdef AT_SYSINFO_EHDR
if
(
!
lm_addr
)
{
ULONG_PTR
ehdr_addr
;
if
(
elf_search_auxv
(
pcs
,
AT_SYSINFO_EHDR
,
&
ehdr_addr
))
if
(
elf_search_auxv
(
pcs
,
ELF_
AT_SYSINFO_EHDR
,
&
ehdr_addr
))
{
static
const
WCHAR
vdsoW
[]
=
{
'['
,
'v'
,
'd'
,
's'
,
'o'
,
']'
,
'.'
,
's'
,
'o'
,
0
};
cb
(
vdsoW
,
ehdr_addr
,
0
,
TRUE
,
user
);
}
}
#endif
return
TRUE
;
}
...
...
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