Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
47f81bc1
Commit
47f81bc1
authored
Feb 07, 2003
by
Todd Inglett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
64bit dynamic app fix (still needs binfmt_elf.c patch to work)
parent
6af6a189
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
10 deletions
+18
-10
arch/ppc64/kernel/process.c
arch/ppc64/kernel/process.c
+17
-9
include/asm-ppc64/processor.h
include/asm-ppc64/processor.h
+1
-1
No files found.
arch/ppc64/kernel/process.c
View file @
47f81bc1
...
...
@@ -236,22 +236,30 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
/*
* Set up a thread for executing a new program
*/
void
start_thread
(
struct
pt_regs
*
regs
,
unsigned
long
nip
,
unsigned
long
sp
)
void
start_thread
(
struct
pt_regs
*
regs
,
unsigned
long
fdptr
,
unsigned
long
sp
)
{
/* NIP is *really* a pointer to the function descriptor for
unsigned
long
entry
,
toc
,
load_addr
=
regs
->
gpr
[
2
];
/* fdptr is a relocated pointer to the function descriptor for
* the elf _start routine. The first entry in the function
* descriptor is the entry address of _start and the second
* entry is the TOC value we need to use.
*/
unsigned
long
*
entry
=
(
unsigned
long
*
)
nip
;
unsigned
long
*
toc
=
entry
+
1
;
set_fs
(
USER_DS
);
memset
(
regs
->
gpr
,
0
,
sizeof
(
regs
->
gpr
));
memset
(
&
regs
->
ctr
,
0
,
4
*
sizeof
(
regs
->
ctr
));
__get_user
(
regs
->
nip
,
entry
);
__get_user
(
entry
,
(
unsigned
long
*
)
fdptr
);
__get_user
(
toc
,
(
unsigned
long
*
)
fdptr
+
1
);
/* Check whether the e_entry function descriptor entries
* need to be relocated before we can use them.
*/
if
(
load_addr
!=
0
)
{
entry
+=
load_addr
;
toc
+=
load_addr
;
}
regs
->
nip
=
entry
;
regs
->
gpr
[
1
]
=
sp
;
__get_user
(
regs
->
gpr
[
2
],
toc
)
;
regs
->
gpr
[
2
]
=
toc
;
regs
->
msr
=
MSR_USER64
;
if
(
last_task_used_math
==
current
)
last_task_used_math
=
0
;
...
...
include/asm-ppc64/processor.h
View file @
47f81bc1
...
...
@@ -599,7 +599,7 @@ GLUE(GLUE(.LT,NAME),_procname_end):
extern
int
have_of
;
struct
task_struct
;
void
start_thread
(
struct
pt_regs
*
regs
,
unsigned
long
nip
,
unsigned
long
sp
);
void
start_thread
(
struct
pt_regs
*
regs
,
unsigned
long
fdptr
,
unsigned
long
sp
);
void
release_thread
(
struct
task_struct
*
);
/*
...
...
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