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
7b12b184
Commit
7b12b184
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 symbol table entry declaration.
Based on glibc. Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
849cf6ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
9 deletions
+29
-9
elf_module.c
dlls/dbghelp/elf_module.c
+29
-9
No files found.
dlls/dbghelp/elf_module.c
View file @
7b12b184
...
@@ -57,10 +57,30 @@ struct elf_info
...
@@ -57,10 +57,30 @@ struct elf_info
const
WCHAR
*
module_name
;
/* OUT found module name (if ELF_INFO_NAME is set) */
const
WCHAR
*
module_name
;
/* OUT found module name (if ELF_INFO_NAME is set) */
};
};
struct
elf_sym32
{
UINT32
st_name
;
/* Symbol name (string tbl index) */
UINT32
st_value
;
/* Symbol value */
UINT32
st_size
;
/* Symbol size */
UINT8
st_info
;
/* Symbol type and binding */
UINT8
st_other
;
/* Symbol visibility */
UINT16
st_shndx
;
/* Section index */
};
struct
elf_sym
{
UINT32
st_name
;
/* Symbol name (string tbl index) */
UINT8
st_info
;
/* Symbol type and binding */
UINT8
st_other
;
/* Symbol visibility */
UINT16
st_shndx
;
/* Section index */
UINT64
st_value
;
/* Symbol value */
UINT64
st_size
;
/* Symbol size */
};
struct
symtab_elt
struct
symtab_elt
{
{
struct
hash_table_elt
ht_elt
;
struct
hash_table_elt
ht_elt
;
Elf64_Sym
sym
;
struct
elf_sym
sym
;
struct
symt_compiland
*
compiland
;
struct
symt_compiland
*
compiland
;
unsigned
used
;
unsigned
used
;
};
};
...
@@ -605,18 +625,18 @@ static void elf_hash_symtab(struct module* module, struct pool* pool,
...
@@ -605,18 +625,18 @@ static void elf_hash_symtab(struct module* module, struct pool* pool,
}
}
nsym
=
image_get_map_size
(
&
ism
)
/
nsym
=
image_get_map_size
(
&
ism
)
/
(
fmap
->
addr_size
==
32
?
sizeof
(
Elf32_Sym
)
:
sizeof
(
Elf64_S
ym
));
(
fmap
->
addr_size
==
32
?
sizeof
(
struct
elf_sym32
)
:
sizeof
(
struct
elf_s
ym
));
for
(
j
=
0
;
thunks
[
j
].
symname
;
j
++
)
for
(
j
=
0
;
thunks
[
j
].
symname
;
j
++
)
thunks
[
j
].
rva_start
=
thunks
[
j
].
rva_end
=
0
;
thunks
[
j
].
rva_start
=
thunks
[
j
].
rva_end
=
0
;
for
(
i
=
0
;
i
<
nsym
;
i
++
)
for
(
i
=
0
;
i
<
nsym
;
i
++
)
{
{
Elf64_S
ym
sym
;
struct
elf_s
ym
sym
;
if
(
fmap
->
addr_size
==
32
)
if
(
fmap
->
addr_size
==
32
)
{
{
Elf32_Sym
*
sym32
=
&
((
Elf32_Sym
*
)
symtab
)[
i
];
struct
elf_sym32
*
sym32
=
&
((
struct
elf_sym32
*
)
symtab
)[
i
];
sym
.
st_name
=
sym32
->
st_name
;
sym
.
st_name
=
sym32
->
st_name
;
sym
.
st_value
=
sym32
->
st_value
;
sym
.
st_value
=
sym32
->
st_value
;
...
@@ -626,7 +646,7 @@ static void elf_hash_symtab(struct module* module, struct pool* pool,
...
@@ -626,7 +646,7 @@ static void elf_hash_symtab(struct module* module, struct pool* pool,
sym
.
st_shndx
=
sym32
->
st_shndx
;
sym
.
st_shndx
=
sym32
->
st_shndx
;
}
}
else
else
sym
=
((
Elf64_S
ym
*
)
symtab
)[
i
];
sym
=
((
struct
elf_s
ym
*
)
symtab
)[
i
];
/* Ignore certain types of entries which really aren't of that much
/* Ignore certain types of entries which really aren't of that much
* interest.
* interest.
...
@@ -709,9 +729,9 @@ static void elf_hash_symtab(struct module* module, struct pool* pool,
...
@@ -709,9 +729,9 @@ static void elf_hash_symtab(struct module* module, struct pool* pool,
*
*
* lookup a symbol by name in our internal hash table for the symtab
* lookup a symbol by name in our internal hash table for the symtab
*/
*/
static
const
Elf64_S
ym
*
elf_lookup_symtab
(
const
struct
module
*
module
,
static
const
struct
elf_s
ym
*
elf_lookup_symtab
(
const
struct
module
*
module
,
const
struct
hash_table
*
ht_symtab
,
const
struct
hash_table
*
ht_symtab
,
const
char
*
name
,
const
struct
symt
*
compiland
)
const
char
*
name
,
const
struct
symt
*
compiland
)
{
{
struct
symtab_elt
*
weak_result
=
NULL
;
/* without compiland name */
struct
symtab_elt
*
weak_result
=
NULL
;
/* without compiland name */
struct
symtab_elt
*
result
=
NULL
;
struct
symtab_elt
*
result
=
NULL
;
...
@@ -783,7 +803,7 @@ static void elf_finish_stabs_info(struct module* module, const struct hash_table
...
@@ -783,7 +803,7 @@ static void elf_finish_stabs_info(struct module* module, const struct hash_table
struct
hash_table_iter
hti
;
struct
hash_table_iter
hti
;
void
*
ptr
;
void
*
ptr
;
struct
symt_ht
*
sym
;
struct
symt_ht
*
sym
;
const
Elf64_Sym
*
symp
;
const
struct
elf_sym
*
symp
;
struct
elf_module_info
*
elf_info
=
module
->
format_info
[
DFI_ELF
]
->
u
.
elf_info
;
struct
elf_module_info
*
elf_info
=
module
->
format_info
[
DFI_ELF
]
->
u
.
elf_info
;
hash_table_iter_init
(
&
module
->
ht_symbols
,
&
hti
,
NULL
);
hash_table_iter_init
(
&
module
->
ht_symbols
,
&
hti
,
NULL
);
...
...
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