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
Kirill Smelkov
linux
Commits
ab4d28ea
Commit
ab4d28ea
authored
Apr 16, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sparc64: Fix elf_gregset_t layout for native 64-bit binaries.
parent
5267f329
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
include/asm-sparc64/elf.h
include/asm-sparc64/elf.h
+31
-1
No files found.
include/asm-sparc64/elf.h
View file @
ab4d28ea
...
@@ -21,8 +21,38 @@
...
@@ -21,8 +21,38 @@
typedef
unsigned
long
elf_greg_t
;
typedef
unsigned
long
elf_greg_t
;
#define ELF_NGREG
(sizeof (struct pt_regs) / sizeof(elf_greg_t))
#define ELF_NGREG
36
typedef
elf_greg_t
elf_gregset_t
[
ELF_NGREG
];
typedef
elf_greg_t
elf_gregset_t
[
ELF_NGREG
];
/* Format of 64-bit elf_gregset_t is:
* G0 --> G7
* O0 --> O7
* L0 --> L7
* I0 --> I7
* TSTATE
* TPC
* TNPC
* Y
*/
#define ELF_CORE_COPY_REGS(__elf_regs, __pt_regs) \
do { unsigned long *dest = &(__elf_regs[0]); \
struct pt_regs *src = (__pt_regs); \
unsigned long *sp; \
int i; \
for(i = 0; i < 16; i++) \
dest[i] = src->u_regs[i]; \
/* Don't try this at home kids... */
\
set_fs(USER_DS); \
sp = (unsigned long *) \
((src->u_regs[14] + STACK_BIAS) \
& 0xfffffffffffffff8UL); \
for(i = 0; i < 16; i++) \
__get_user(dest[i+16], &sp[i]); \
set_fs(KERNEL_DS); \
dest[32] = src->tstate; \
dest[33] = src->tpc; \
dest[34] = src->tnpc; \
dest[35] = src->y; \
} while (0);
typedef
struct
{
typedef
struct
{
unsigned
long
pr_regs
[
32
];
unsigned
long
pr_regs
[
32
];
...
...
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