Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Billy Laws
wine
Commits
b6eec865
Commit
b6eec865
authored
4 months ago
by
Billy Laws
Committed by
Alexandre Julliard
4 months ago
Browse files
Options
Downloads
Patches
Plain Diff
ntdll: Add arm64ec_get_module_metadata helper.
parent
e5adcbff
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/ntdll/ntdll_misc.h
+1
-0
1 addition, 0 deletions
dlls/ntdll/ntdll_misc.h
dlls/ntdll/signal_arm64ec.c
+18
-0
18 additions, 0 deletions
dlls/ntdll/signal_arm64ec.c
dlls/ntdll/unwind.c
+2
-10
2 additions, 10 deletions
dlls/ntdll/unwind.c
with
21 additions
and
10 deletions
dlls/ntdll/ntdll_misc.h
+
1
−
0
View file @
b6eec865
...
...
@@ -169,6 +169,7 @@ extern void heap_thread_detach(void);
extern
NTSTATUS
arm64ec_process_init
(
HMODULE
module
);
extern
NTSTATUS
arm64ec_thread_init
(
void
);
extern
IMAGE_ARM64EC_METADATA
*
arm64ec_get_module_metadata
(
HMODULE
module
);
extern
void
arm64ec_update_hybrid_metadata
(
void
*
module
,
IMAGE_NT_HEADERS
*
nt
,
const
IMAGE_ARM64EC_METADATA
*
metadata
);
extern
void
invoke_arm64ec_syscall
(
void
);
...
...
This diff is collapsed.
Click to expand it.
dlls/ntdll/signal_arm64ec.c
+
18
−
0
View file @
b6eec865
...
...
@@ -220,6 +220,24 @@ NTSTATUS arm64ec_thread_init(void)
}
/**********************************************************************
* arm64ec_get_module_metadata
*/
IMAGE_ARM64EC_METADATA
*
arm64ec_get_module_metadata
(
HMODULE
module
)
{
IMAGE_LOAD_CONFIG_DIRECTORY
*
cfg
;
ULONG
size
;
if
(
!
(
cfg
=
RtlImageDirectoryEntryToData
(
module
,
TRUE
,
IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG
,
&
size
)))
return
NULL
;
size
=
min
(
size
,
cfg
->
Size
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY
,
CHPEMetadataPointer
))
return
NULL
;
return
(
IMAGE_ARM64EC_METADATA
*
)
cfg
->
CHPEMetadataPointer
;
}
static
void
update_hybrid_pointer
(
void
*
module
,
const
IMAGE_SECTION_HEADER
*
sec
,
UINT
rva
,
void
*
ptr
)
{
if
(
!
rva
)
return
;
...
...
This diff is collapsed.
Click to expand it.
dlls/ntdll/unwind.c
+
2
−
10
View file @
b6eec865
...
...
@@ -267,16 +267,8 @@ PRUNTIME_FUNCTION WINAPI RtlLookupFunctionTable( ULONG_PTR pc, ULONG_PTR *base,
#ifdef __arm64ec__
if
(
RtlIsEcCode
(
pc
))
{
IMAGE_LOAD_CONFIG_DIRECTORY
*
cfg
;
IMAGE_ARM64EC_METADATA
*
metadata
;
ULONG
size
;
if
(
!
(
cfg
=
RtlImageDirectoryEntryToData
(
module
->
DllBase
,
TRUE
,
IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG
,
&
size
)))
return
NULL
;
size
=
min
(
size
,
cfg
->
Size
);
if
(
size
<=
offsetof
(
IMAGE_LOAD_CONFIG_DIRECTORY
,
CHPEMetadataPointer
))
return
NULL
;
metadata
=
(
IMAGE_ARM64EC_METADATA
*
)
cfg
->
CHPEMetadataPointer
;
IMAGE_ARM64EC_METADATA
*
metadata
=
arm64ec_get_module_metadata
(
module
->
DllBase
);
if
(
!
metadata
)
return
NULL
;
*
len
=
metadata
->
ExtraRFETableSize
;
return
(
RUNTIME_FUNCTION
*
)(
*
base
+
metadata
->
ExtraRFETable
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment