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
7e112c29
Commit
7e112c29
authored
Dec 21, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loader: Setup the TLS register on x86-64 for stack protector checks.
parent
0b6bfade
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
preloader.c
loader/preloader.c
+7
-1
No files found.
loader/preloader.c
View file @
7e112c29
...
...
@@ -344,6 +344,8 @@ static inline int wld_prctl( int code, long arg )
#elif defined(__x86_64__)
void
*
thread_data
[
256
];
/*
* The _start function is the entry and exit point of this program
*
...
...
@@ -355,8 +357,12 @@ extern char _end[];
__ASM_GLOBAL_FUNC
(
_start
,
"movq %rsp,%rax
\n\t
"
"leaq -144(%rsp),%rsp
\n\t
"
/* allocate some space for extra aux values */
"movq %rax,(%rsp)
\n\t
"
/* orig stack pointer */
"movq $thread_data,%rsi
\n\t
"
"movq $0x1002,%rdi
\n\t
"
/* ARCH_SET_FS */
"movq $158,%rax
\n\t
"
/* SYS_arch_prctl */
"syscall
\n\t
"
"movq %rsp,%rdi
\n\t
"
/* ptr to orig stack pointer */
"movq %rax,(%rdi)
\n\t
"
/* orig stack pointer */
"call wld_start
\n\t
"
"movq (%rsp),%rsp
\n\t
"
/* new stack pointer */
"pushq %rax
\n\t
"
/* ELF interpreter entry point */
...
...
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