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
d5c089f5
Commit
d5c089f5
authored
Oct 29, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Set PE timestamps to a hash of the file name.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=44061
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
488ec98b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
spec32.c
tools/winebuild/spec32.c
+11
-3
No files found.
tools/winebuild/spec32.c
View file @
d5c089f5
...
...
@@ -51,6 +51,14 @@ int needs_get_pc_thunk = 0;
static
const
char
builtin_signature
[
32
]
=
"Wine builtin DLL"
;
static
const
char
fakedll_signature
[
32
]
=
"Wine placeholder DLL"
;
static
unsigned
int
hash_filename
(
const
char
*
name
)
{
/* FNV-1 hash */
unsigned
int
ret
=
2166136261u
;
while
(
*
name
)
ret
=
(
ret
*
16777619
)
^
*
name
++
;
return
ret
;
}
/* check if entry point needs a relay thunk */
static
inline
int
needs_relay
(
const
ORDDEF
*
odp
)
{
...
...
@@ -405,7 +413,7 @@ void output_exports( DLLSPEC *spec )
/* export directory header */
output
(
"
\t
.long 0
\n
"
);
/* Characteristics */
output
(
"
\t
.long
0
\n
"
);
/* TimeDateStamp */
output
(
"
\t
.long
%u
\n
"
,
hash_filename
(
spec
->
file_name
)
);
/* TimeDateStamp */
output
(
"
\t
.long 0
\n
"
);
/* MajorVersion/MinorVersion */
output_rva
(
".L__wine_spec_exp_names"
);
/* Name */
output
(
"
\t
.long %u
\n
"
,
spec
->
base
);
/* Base */
...
...
@@ -666,7 +674,7 @@ void output_module( DLLSPEC *spec )
output
(
"
\t
.short 0x%04x
\n
"
,
/* Machine */
machine
);
output
(
"
\t
.short 0
\n
"
);
/* NumberOfSections */
output
(
"
\t
.long
0
\n
"
);
/* TimeDateStamp */
output
(
"
\t
.long
%u
\n
"
,
hash_filename
(
spec
->
file_name
)
);
/* TimeDateStamp */
output
(
"
\t
.long 0
\n
"
);
/* PointerToSymbolTable */
output
(
"
\t
.long 0
\n
"
);
/* NumberOfSymbols */
output
(
"
\t
.short %d
\n
"
,
/* SizeOfOptionalHeader */
...
...
@@ -817,7 +825,7 @@ void output_fake_module( DLLSPEC *spec )
case
CPU_ARM64
:
put_word
(
IMAGE_FILE_MACHINE_ARM64
);
break
;
}
put_word
(
nb_sections
);
/* NumberOfSections */
put_dword
(
0
);
/* TimeDateStamp */
put_dword
(
hash_filename
(
spec
->
file_name
)
);
/* TimeDateStamp */
put_dword
(
0
);
/* PointerToSymbolTable */
put_dword
(
0
);
/* NumberOfSymbols */
put_word
(
get_ptr_size
()
==
8
?
...
...
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