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
4eb2c553
Commit
4eb2c553
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: Simplify the arm version of a stub function.
Signed-off-by:
Martin Storsjo
<
martin@martin.st
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dd305360
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
19 deletions
+9
-19
loader.c
dlls/ntdll/loader.c
+9
-19
No files found.
dlls/ntdll/loader.c
View file @
4eb2c553
...
...
@@ -237,13 +237,11 @@ struct stub
struct
stub
{
BYTE
ldr_r0
[
4
];
/* ldr r0, $dll */
BYTE
mov_pc_pc1
[
4
];
/* mov pc,pc */
const
char
*
dll
;
BYTE
ldr_r1
[
4
];
/* ldr r1, $name */
BYTE
mov_pc_pc2
[
4
];
/* mov pc,pc */
const
char
*
name
;
BYTE
mov_r2_lr
[
4
];
/* mov r2, lr */
BYTE
ldr_pc_pc
[
4
];
/* ldr pc, [pc, #-4] */
BYTE
ldr_pc_pc
[
4
];
/* ldr pc, [pc, #4] */
const
char
*
dll
;
const
char
*
name
;
const
void
*
entry
;
};
#elif defined(__aarch64__)
...
...
@@ -303,32 +301,24 @@ static ULONG_PTR allocate_stub( const char *dll, const char *name )
stub
->
call
=
0xe8
;
/* call stub_entry_point */
stub
->
entry
=
(
BYTE
*
)
stub_entry_point
-
(
BYTE
*
)(
&
stub
->
entry
+
1
);
#elif defined(__arm__)
stub
->
ldr_r0
[
0
]
=
0x0
0
;
/* ldr r0, $dll
*/
stub
->
ldr_r0
[
0
]
=
0x0
8
;
/* ldr r0, [pc, #8] ($dll)
*/
stub
->
ldr_r0
[
1
]
=
0x00
;
stub
->
ldr_r0
[
2
]
=
0x9f
;
stub
->
ldr_r0
[
3
]
=
0xe5
;
stub
->
mov_pc_pc1
[
0
]
=
0x0f
;
/* mov pc,pc */
stub
->
mov_pc_pc1
[
1
]
=
0xf0
;
stub
->
mov_pc_pc1
[
2
]
=
0xa0
;
stub
->
mov_pc_pc1
[
3
]
=
0xe1
;
stub
->
dll
=
dll
;
stub
->
ldr_r1
[
0
]
=
0x00
;
/* ldr r1, $name */
stub
->
ldr_r1
[
0
]
=
0x08
;
/* ldr r1, [pc, #8] ($name) */
stub
->
ldr_r1
[
1
]
=
0x10
;
stub
->
ldr_r1
[
2
]
=
0x9f
;
stub
->
ldr_r1
[
3
]
=
0xe5
;
stub
->
mov_pc_pc2
[
0
]
=
0x0f
;
/* mov pc,pc */
stub
->
mov_pc_pc2
[
1
]
=
0xf0
;
stub
->
mov_pc_pc2
[
2
]
=
0xa0
;
stub
->
mov_pc_pc2
[
3
]
=
0xe1
;
stub
->
name
=
name
;
stub
->
mov_r2_lr
[
0
]
=
0x0e
;
/* mov r2, lr */
stub
->
mov_r2_lr
[
1
]
=
0x20
;
stub
->
mov_r2_lr
[
2
]
=
0xa0
;
stub
->
mov_r2_lr
[
3
]
=
0xe1
;
stub
->
ldr_pc_pc
[
0
]
=
0x04
;
/* ldr pc, [pc, #
-
4] */
stub
->
ldr_pc_pc
[
0
]
=
0x04
;
/* ldr pc, [pc, #4] */
stub
->
ldr_pc_pc
[
1
]
=
0xf0
;
stub
->
ldr_pc_pc
[
2
]
=
0x
1
f
;
stub
->
ldr_pc_pc
[
2
]
=
0x
9
f
;
stub
->
ldr_pc_pc
[
3
]
=
0xe5
;
stub
->
dll
=
dll
;
stub
->
name
=
name
;
stub
->
entry
=
stub_entry_point
;
#elif defined(__aarch64__)
stub
->
ldr_x0
[
0
]
=
0xa0
;
/* ldr x0, #20 ($dll) */
...
...
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