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
64341284
Commit
64341284
authored
Apr 01, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Use local macho section declaration.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c695e7e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
15 deletions
+34
-15
image_private.h
dlls/dbghelp/image_private.h
+32
-13
macho_module.c
dlls/dbghelp/macho_module.c
+2
-2
No files found.
dlls/dbghelp/image_private.h
View file @
64341284
...
...
@@ -19,16 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifdef HAVE_LINK_H
# include <link.h>
#endif
#ifdef HAVE_SYS_LINK_H
# include <sys/link.h>
#endif
#ifdef HAVE_MACH_O_LOADER_H
#include <mach-o/loader.h>
#endif
#define IMAGE_NO_MAP ((void*)-1)
struct
elf_header
...
...
@@ -76,6 +66,37 @@ struct macho_uuid_command
UINT8
uuid
[
16
];
};
struct
macho_section
{
char
sectname
[
16
];
/* name of this section */
char
segname
[
16
];
/* segment this section goes in */
UINT64
addr
;
/* memory address of this section */
UINT64
size
;
/* size in bytes of this section */
UINT32
offset
;
/* file offset of this section */
UINT32
align
;
/* section alignment (power of 2) */
UINT32
reloff
;
/* file offset of relocation entries */
UINT32
nreloc
;
/* number of relocation entries */
UINT32
flags
;
/* flags (section type and attributes)*/
UINT32
reserved1
;
/* reserved (for offset or index) */
UINT32
reserved2
;
/* reserved (for count or sizeof) */
UINT32
reserved3
;
/* reserved */
};
struct
macho_section32
{
char
sectname
[
16
];
/* name of this section */
char
segname
[
16
];
/* segment this section goes in */
UINT32
addr
;
/* memory address of this section */
UINT32
size
;
/* size in bytes of this section */
UINT32
offset
;
/* file offset of this section */
UINT32
align
;
/* section alignment (power of 2) */
UINT32
reloff
;
/* file offset of relocation entries */
UINT32
nreloc
;
/* number of relocation entries */
UINT32
flags
;
/* flags (section type and attributes)*/
UINT32
reserved1
;
/* reserved (for offset or index) */
UINT32
reserved2
;
/* reserved (for count or sizeof) */
};
/* structure holding information while handling an ELF image
* allows one by one section mapping for memory savings
*/
...
...
@@ -118,15 +139,13 @@ struct image_file_map
* read from arch_offset. */
unsigned
arch_offset
;
#ifdef HAVE_MACH_O_LOADER_H
int
num_sections
;
struct
{
struct
section_64
section
;
struct
macho_section
section
;
const
char
*
mapped
;
unsigned
int
ignored
:
1
;
}
*
sect
;
#endif
}
macho
;
struct
pe_file_map
{
...
...
dlls/dbghelp/macho_module.c
View file @
64341284
...
...
@@ -624,7 +624,7 @@ static int macho_load_section_info(struct image_file_map* ifm, const struct mach
{
if
(
ifm
->
addr_size
==
32
)
{
const
struct
section
*
section
=
&
((
const
struct
section
*
)
sections
)[
i
];
const
struct
macho_section32
*
section
=
&
((
const
struct
macho_section32
*
)
sections
)[
i
];
memcpy
(
fmap
->
sect
[
info
->
section_index
].
section
.
sectname
,
section
->
sectname
,
sizeof
(
section
->
sectname
));
memcpy
(
fmap
->
sect
[
info
->
section_index
].
section
.
segname
,
section
->
segname
,
sizeof
(
section
->
segname
));
fmap
->
sect
[
info
->
section_index
].
section
.
addr
=
section
->
addr
;
...
...
@@ -636,7 +636,7 @@ static int macho_load_section_info(struct image_file_map* ifm, const struct mach
fmap
->
sect
[
info
->
section_index
].
section
.
flags
=
section
->
flags
;
}
else
fmap
->
sect
[
info
->
section_index
].
section
=
((
const
struct
section_64
*
)
sections
)[
i
];
fmap
->
sect
[
info
->
section_index
].
section
=
((
const
struct
macho_section
*
)
sections
)[
i
];
fmap
->
sect
[
info
->
section_index
].
mapped
=
IMAGE_NO_MAP
;
fmap
->
sect
[
info
->
section_index
].
ignored
=
ignore
;
...
...
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