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
7b318b17
Commit
7b318b17
authored
Dec 03, 2014
by
André Hentschel
Committed by
Alexandre Julliard
Dec 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Remove unused code (Clang).
parent
76272d6e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
48 deletions
+15
-48
resource.c
dlls/kernel32/tests/resource.c
+15
-48
No files found.
dlls/kernel32/tests/resource.c
View file @
7b318b17
...
...
@@ -39,15 +39,8 @@ static const IMAGE_SECTION_HEADER sh_rodata_1 =
IMAGE_SCN_CNT_INITIALIZED_DATA
|
IMAGE_SCN_MEM_READ
};
/* rodata @ [0x1000-0x4000) */
static
const
IMAGE_SECTION_HEADER
sh_rodata_2
=
{
".rodata"
,
{
3
*
page_size
},
page_size
,
3
*
page_size
,
page_size
,
0
,
0
,
0
,
0
,
IMAGE_SCN_CNT_INITIALIZED_DATA
|
IMAGE_SCN_MEM_READ
};
/* rodata @ [0x1000-0x2000) */
static
const
IMAGE_SECTION_HEADER
sh_rodata_
3
=
static
const
IMAGE_SECTION_HEADER
sh_rodata_
2
=
{
".rodata"
,
{
page_size
},
page_size
,
page_size
,
page_size
,
0
,
0
,
0
,
0
,
IMAGE_SCN_CNT_INITIALIZED_DATA
|
IMAGE_SCN_MEM_READ
...
...
@@ -60,50 +53,36 @@ static const IMAGE_SECTION_HEADER sh_rsrc_1 =
IMAGE_SCN_CNT_INITIALIZED_DATA
|
IMAGE_SCN_MEM_READ
};
/* rsrc @ [0x4000-0x5000) */
static
const
IMAGE_SECTION_HEADER
sh_rsrc_2
=
{
".rsrc
\0\0
"
,
{
page_size
},
4
*
page_size
,
page_size
,
4
*
page_size
,
0
,
0
,
0
,
0
,
IMAGE_SCN_CNT_INITIALIZED_DATA
|
IMAGE_SCN_MEM_READ
};
/* rsrc @ [0x2000-0x4000) */
static
const
IMAGE_SECTION_HEADER
sh_rsrc_
3
=
static
const
IMAGE_SECTION_HEADER
sh_rsrc_
2
=
{
".rsrc
\0\0
"
,
{
2
*
page_size
},
rva_rsrc_start
-
page_size
,
2
*
page_size
,
rva_rsrc_start
-
page_size
,
0
,
0
,
0
,
0
,
IMAGE_SCN_CNT_INITIALIZED_DATA
|
IMAGE_SCN_MEM_READ
};
/* rsrc @ [0x2000-0x3000) */
static
const
IMAGE_SECTION_HEADER
sh_rsrc_
4
=
static
const
IMAGE_SECTION_HEADER
sh_rsrc_
3
=
{
".rsrc
\0\0
"
,
{
page_size
},
rva_rsrc_start
-
page_size
,
page_size
,
rva_rsrc_start
-
page_size
,
0
,
0
,
0
,
0
,
IMAGE_SCN_CNT_INITIALIZED_DATA
|
IMAGE_SCN_MEM_READ
};
/* rsrc @ [0x3000-0x6000) */
static
const
IMAGE_SECTION_HEADER
sh_rsrc_
5
=
static
const
IMAGE_SECTION_HEADER
sh_rsrc_
4
=
{
".rsrc
\0\0
"
,
{
3
*
page_size
},
rva_rsrc_start
,
3
*
page_size
,
rva_rsrc_start
,
0
,
0
,
0
,
0
,
IMAGE_SCN_CNT_INITIALIZED_DATA
|
IMAGE_SCN_MEM_READ
};
/* rsrc @ [0x4000-0x7000) */
static
const
IMAGE_SECTION_HEADER
sh_rsrc_6
=
{
".rsrc
\0\0
"
,
{
3
*
page_size
},
4
*
page_size
,
3
*
page_size
,
4
*
page_size
,
0
,
0
,
0
,
0
,
IMAGE_SCN_CNT_INITIALIZED_DATA
|
IMAGE_SCN_MEM_READ
};
/* rsrc @ [0x2000-0x5000) */
static
const
IMAGE_SECTION_HEADER
sh_rsrc_
7
=
static
const
IMAGE_SECTION_HEADER
sh_rsrc_
5
=
{
".rsrc
\0\0
"
,
{
3
*
page_size
},
2
*
page_size
,
3
*
page_size
,
2
*
page_size
,
0
,
0
,
0
,
0
,
IMAGE_SCN_CNT_INITIALIZED_DATA
|
IMAGE_SCN_MEM_READ
};
/* rsrc @ [0x3000-0x4000), small SizeOfRawData */
static
const
IMAGE_SECTION_HEADER
sh_rsrc_
8
=
static
const
IMAGE_SECTION_HEADER
sh_rsrc_
6
=
{
".rsrc
\0\0
"
,
{
page_size
},
rva_rsrc_start
,
8
,
rva_rsrc_start
,
0
,
0
,
0
,
0
,
IMAGE_SCN_CNT_INITIALIZED_DATA
|
IMAGE_SCN_MEM_READ
...
...
@@ -148,29 +127,17 @@ static const struct _sec_variants
{{
&
sh_rodata_1
,
&
sh_rsrc_1
,
NULL
},
4
*
page_size
,
1
,
0
,
0
},
{{
&
sh_rodata_1
,
&
sh_rsrc_1
,
NULL
},
4
*
page_size
,
1
,
0
,
0
},
{{
&
sh_rodata_1
,
&
sh_rsrc_1
,
NULL
},
4
*
page_size
,
1
,
0
,
1
},
{{
&
sh_rodata_1
,
&
sh_rsrc_5
,
NULL
},
6
*
page_size
,
1
,
0
,
1
}
},
/* single .rodata section with compatible characteristics, data directory entry points to section end */
/* Vista+ - existing section isn't used, new section is created at the end of file */
/* NT4/2000/2003 - image is broken */
#if 0
{
{{&sh_rodata_2, NULL, NULL}},
{{&sh_rodata_2, &sh_rsrc_2, NULL}, 5*page_size, 1, 0, 0},
{{&sh_rodata_2, &sh_rsrc_2, NULL}, 5*page_size, 1, 0, 0},
{{&sh_rodata_2, &sh_rsrc_2, NULL}, 5*page_size, 1, 0, 1},
{{&sh_rodata_2, &sh_rsrc_6, NULL}, 7*page_size, 1, 0, 1}
{{
&
sh_rodata_1
,
&
sh_rsrc_4
,
NULL
},
6
*
page_size
,
1
,
0
,
1
}
},
#endif
/* .rsrc is the last section, data directory entry points to section end */
/* Vista+ - resources are moved to section start (trashing data that could be there), and section is trimmed */
/* NT4/2000/2003 - resources are moved to section start (trashing data that could be there); section isn't trimmed */
{
{{
&
sh_rodata_
3
,
&
sh_rsrc_3
,
NULL
}},
{{
&
sh_rodata_
3
,
&
sh_rsrc_4
,
NULL
},
3
*
page_size
,
1
,
0
,
0
},
{{
&
sh_rodata_
3
,
&
sh_rsrc_4
,
NULL
},
3
*
page_size
,
1
,
0
,
0
},
{{
&
sh_rodata_
3
,
&
sh_rsrc_4
,
NULL
},
3
*
page_size
,
1
,
0
,
1
},
{{
&
sh_rodata_
3
,
&
sh_rsrc_7
,
NULL
},
5
*
page_size
,
1
,
0
,
1
}
{{
&
sh_rodata_
2
,
&
sh_rsrc_2
,
NULL
}},
{{
&
sh_rodata_
2
,
&
sh_rsrc_3
,
NULL
},
3
*
page_size
,
1
,
0
,
0
},
{{
&
sh_rodata_
2
,
&
sh_rsrc_3
,
NULL
},
3
*
page_size
,
1
,
0
,
0
},
{{
&
sh_rodata_
2
,
&
sh_rsrc_3
,
NULL
},
3
*
page_size
,
1
,
0
,
1
},
{{
&
sh_rodata_
2
,
&
sh_rsrc_5
,
NULL
},
5
*
page_size
,
1
,
0
,
1
}
},
/* .rsrc is not the last section */
/* section is reused; sections after .rsrc are shifted to give space to rsrc (in-image offset and RVA!) */
...
...
@@ -179,15 +146,15 @@ static const struct _sec_variants
{{
&
sh_rodata_1
,
&
sh_rsrc_1
,
&
sh_junk
},
5
*
page_size
,
1
,
0
,
0
},
{{
&
sh_rodata_1
,
&
sh_rsrc_1
,
&
sh_junk
},
5
*
page_size
,
1
,
0
,
0
},
{{
&
sh_rodata_1
,
&
sh_rsrc_1
,
&
sh_junk
},
5
*
page_size
,
1
,
0
,
1
},
{{
&
sh_rodata_1
,
&
sh_rsrc_
5
,
&
sh_junk_2
},
7
*
page_size
,
1
,
0
,
1
}
{{
&
sh_rodata_1
,
&
sh_rsrc_
4
,
&
sh_junk_2
},
7
*
page_size
,
1
,
0
,
1
}
},
/* .rsrc is the last section, data directory entry points to whole section, file size is not aligned on FileAlign */
{
{{
&
sh_rodata_1
,
&
sh_rsrc_
8
,
NULL
}},
{{
&
sh_rodata_1
,
&
sh_rsrc_
6
,
NULL
}},
{{
&
sh_rodata_1
,
&
sh_rsrc_1
,
NULL
},
4
*
page_size
,
1
,
0
,
0
},
{{
&
sh_rodata_1
,
&
sh_rsrc_1
,
NULL
},
4
*
page_size
,
1
,
0
,
0
},
{{
&
sh_rodata_1
,
&
sh_rsrc_1
,
NULL
},
4
*
page_size
,
1
,
0
,
1
},
{{
&
sh_rodata_1
,
&
sh_rsrc_
5
,
NULL
},
6
*
page_size
,
1
,
0
,
1
}
{{
&
sh_rodata_1
,
&
sh_rsrc_
4
,
NULL
},
6
*
page_size
,
1
,
0
,
1
}
}
};
...
...
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