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
7a66313c
Commit
7a66313c
authored
Feb 29, 2024
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 29, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Output load config on PE targets.
parent
57c2c41d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
22 deletions
+84
-22
arm64ec.c
dlls/winecrt0/arm64ec.c
+0
-22
spec32.c
tools/winebuild/spec32.c
+84
-0
No files found.
dlls/winecrt0/arm64ec.c
View file @
7a66313c
...
...
@@ -102,26 +102,4 @@ asm( "\t.section .rdata,\"dr\"\n"
"
\t
.rva __os_arm64x_helper7
\n
"
"
\t
.rva __os_arm64x_helper8
\n
"
);
asm
(
"
\t
.section .rdata,
\"
dr
\"\n
"
"
\t
.globl _load_config_used
\n
"
"
\t
.balign 8
\n
"
"_load_config_used:
\n
"
"
\t
.word 0x140
\n
"
"
\t
.fill 0x54, 1, 0
\n
"
"
\t
.xword 0
\n
"
/* FIXME: __security_cookie */
"
\t
.fill 0x10, 1, 0
\n
"
"
\t
.xword __guard_check_icall_fptr
\n
"
"
\t
.xword __guard_dispatch_icall_fptr
\n
"
"
\t
.xword __guard_fids_table
\n
"
"
\t
.xword __guard_fids_count
\n
"
"
\t
.xword __guard_flags
\n
"
"
\t
.xword 0
\n
"
"
\t
.xword __guard_iat_table
\n
"
"
\t
.xword __guard_iat_count
\n
"
"
\t
.xword __guard_longjmp_table
\n
"
"
\t
.xword __guard_longjmp_count
\n
"
"
\t
.xword 0
\n
"
"
\t
.xword __chpe_metadata
\n
"
"
\t
.fill 0x78, 1, 0
\n
"
);
#endif
/* __arm64ec__ */
tools/winebuild/spec32.c
View file @
7a66313c
...
...
@@ -606,6 +606,89 @@ void output_exports( DLLSPEC *spec )
/*******************************************************************
* output_load_config
*
* Output the load configuration structure.
*/
static
void
output_load_config
(
void
)
{
if
(
!
is_pe
())
return
;
output
(
"
\n
/* load_config */
\n\n
"
);
output
(
"
\t
%s
\n
"
,
get_asm_rodata_section
()
);
output
(
"
\t
.globl %s
\n
"
,
asm_name
(
"_load_config_used"
));
output
(
"
\t
.balign %u
\n
"
,
get_ptr_size
()
);
output
(
"%s:
\n
"
,
asm_name
(
"_load_config_used"
));
output
(
"
\t
.long %u
\n
"
,
get_ptr_size
()
==
8
?
0x140
:
0xc0
);
/* Size */
output
(
"
\t
.long 0
\n
"
);
/* TimeDateStamp */
output
(
"
\t
.short 0
\n
"
);
/* MajorVersion */
output
(
"
\t
.short 0
\n
"
);
/* MinorVersion */
output
(
"
\t
.long 0
\n
"
);
/* GlobalFlagsClear */
output
(
"
\t
.long 0
\n
"
);
/* GlobalFlagsSet */
output
(
"
\t
.long 0
\n
"
);
/* CriticalSectionDefaultTimeout */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* DeCommitFreeBlockThreshold */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* DeCommitTotalFreeThreshold */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* LockPrefixTable */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* MaximumAllocationSize */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* VirtualMemoryThreshold */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* ProcessAffinityMask */
output
(
"
\t
.long 0
\n
"
);
/* ProcessHeapFlags */
output
(
"
\t
.short 0
\n
"
);
/* CSDVersion */
output
(
"
\t
.short 0
\n
"
);
/* DependentLoadFlags */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* EditList */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* SecurityCookie */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* SEHandlerTable */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* SEHandlerCount */
if
(
target
.
cpu
==
CPU_ARM64EC
)
{
output
(
"
\t
%s %s
\n
"
,
get_asm_ptr_keyword
(),
asm_name
(
"__guard_check_icall_fptr"
));
output
(
"
\t
%s %s
\n
"
,
get_asm_ptr_keyword
(),
asm_name
(
"__guard_dispatch_icall_fptr"
));
}
else
{
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* GuardCFCheckFunctionPointer */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* GuardCFDispatchFunctionPointer */
}
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* GuardCFFunctionTable */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* GuardCFFunctionCount */
if
(
target
.
cpu
==
CPU_ARM64EC
)
output
(
"
\t
.long %s
\n
"
,
asm_name
(
"__guard_flags"
));
else
output
(
"
\t
.long 0
\n
"
);
/* GuardFlags */
output
(
"
\t
.short 0
\n
"
);
/* CodeIntegrity.Flags */
output
(
"
\t
.short 0
\n
"
);
/* CodeIntegrity.Catalog */
output
(
"
\t
.long 0
\n
"
);
/* CodeIntegrity.CatalogOffset */
output
(
"
\t
.long 0
\n
"
);
/* CodeIntegrity.Reserved */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* GuardAddressTakenIatEntryTable */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* GuardAddressTakenIatEntryCount */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* GuardLongJumpTargetTable */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* GuardLongJumpTargetCount */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* DynamicValueRelocTable */
if
(
target
.
cpu
==
CPU_ARM64EC
)
output
(
"
\t
%s %s
\n
"
,
get_asm_ptr_keyword
(),
asm_name
(
"__chpe_metadata"
));
else
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* CHPEMetadataPointer */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* GuardRFFailureRoutine */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* GuardRFFailureRoutineFunctionPointer */
output
(
"
\t
.long 0
\n
"
);
/* DynamicValueRelocTableOffset */
output
(
"
\t
.short 0
\n
"
);
/* DynamicValueRelocTableSection */
output
(
"
\t
.short 0
\n
"
);
/* Reserved2 */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* GuardRFVerifyStackPointerFunctionPointer */
output
(
"
\t
.long 0
\n
"
);
/* HotPatchTableOffset */
output
(
"
\t
.long 0
\n
"
);
/* Reserved3 */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* EnclaveConfigurationPointer */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* VolatileMetadataPointer */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* GuardEHContinuationTable */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* GuardEHContinuationCount */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* GuardXFGCheckFunctionPointer */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* GuardXFGDispatchFunctionPointer */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* GuardXFGTableDispatchFunctionPointer */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* CastGuardOsDeterminedFailureMode */
output
(
"
\t
%s 0
\n
"
,
get_asm_ptr_keyword
()
);
/* GuardMemcpyFunctionPointer */
}
/*******************************************************************
* output_module
*
* Output the module data.
...
...
@@ -744,6 +827,7 @@ void output_spec32_file( DLLSPEC *spec )
output_exports
(
spec
);
output_imports
(
spec
);
if
(
needs_get_pc_thunk
)
output_get_pc_thunk
();
output_load_config
();
output_resources
(
spec
);
output_gnu_stack_note
();
close_output_file
();
...
...
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