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
dd305360
Commit
dd305360
authored
Aug 01, 2017
by
Martin Storsjo
Committed by
Alexandre Julliard
Aug 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement allocate_stub for arm64.
Signed-off-by:
Martin Storsjo
<
martin@martin.st
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0e2f75b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
1 deletion
+37
-1
loader.c
dlls/ntdll/loader.c
+37
-1
No files found.
dlls/ntdll/loader.c
View file @
dd305360
...
...
@@ -201,7 +201,7 @@ static inline BOOL call_dll_entry_point( DLLENTRYPROC proc, void *module,
#endif
/* __i386__ */
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__)
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__)
|| defined(__aarch64__)
/*************************************************************************
* stub_entry_point
*
...
...
@@ -246,6 +246,18 @@ struct stub
BYTE
ldr_pc_pc
[
4
];
/* ldr pc, [pc, #-4] */
const
void
*
entry
;
};
#elif defined(__aarch64__)
struct
stub
{
BYTE
ldr_x0
[
4
];
/* ldr x0, $dll */
BYTE
ldr_x1
[
4
];
/* ldr x1, $name */
BYTE
mov_x2_lr
[
4
];
/* mov x2, lr */
BYTE
ldr_x16
[
4
];
/* ldr x16, $entry */
BYTE
br_x16
[
4
];
/* br x16 */
const
char
*
dll
;
const
char
*
name
;
const
void
*
entry
;
};
#else
struct
stub
{
...
...
@@ -318,6 +330,30 @@ static ULONG_PTR allocate_stub( const char *dll, const char *name )
stub
->
ldr_pc_pc
[
2
]
=
0x1f
;
stub
->
ldr_pc_pc
[
3
]
=
0xe5
;
stub
->
entry
=
stub_entry_point
;
#elif defined(__aarch64__)
stub
->
ldr_x0
[
0
]
=
0xa0
;
/* ldr x0, #20 ($dll) */
stub
->
ldr_x0
[
1
]
=
0x00
;
stub
->
ldr_x0
[
2
]
=
0x00
;
stub
->
ldr_x0
[
3
]
=
0x58
;
stub
->
ldr_x1
[
0
]
=
0xc1
;
/* ldr x1, #24 ($name) */
stub
->
ldr_x1
[
1
]
=
0x00
;
stub
->
ldr_x1
[
2
]
=
0x00
;
stub
->
ldr_x1
[
3
]
=
0x58
;
stub
->
mov_x2_lr
[
0
]
=
0xe2
;
/* mov x2, lr */
stub
->
mov_x2_lr
[
1
]
=
0x03
;
stub
->
mov_x2_lr
[
2
]
=
0x1e
;
stub
->
mov_x2_lr
[
3
]
=
0xaa
;
stub
->
ldr_x16
[
0
]
=
0xd0
;
/* ldr x16, #24 ($entry) */
stub
->
ldr_x16
[
1
]
=
0x00
;
stub
->
ldr_x16
[
2
]
=
0x00
;
stub
->
ldr_x16
[
3
]
=
0x58
;
stub
->
br_x16
[
0
]
=
0x00
;
/* br x16 */
stub
->
br_x16
[
1
]
=
0x02
;
stub
->
br_x16
[
2
]
=
0x1f
;
stub
->
br_x16
[
3
]
=
0xd6
;
stub
->
dll
=
dll
;
stub
->
name
=
name
;
stub
->
entry
=
stub_entry_point
;
#else
stub
->
movq_rdi
[
0
]
=
0x48
;
/* movq $dll,%rdi */
stub
->
movq_rdi
[
1
]
=
0xbf
;
...
...
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