Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
3389742f
Commit
3389742f
authored
Feb 07, 2008
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Use regsets for ELF core dumping.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
e72d71c4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
52 deletions
+9
-52
arch/sparc64/kernel/binfmt_elf32.c
arch/sparc64/kernel/binfmt_elf32.c
+4
-27
include/asm-sparc64/elf.h
include/asm-sparc64/elf.h
+5
-25
No files found.
arch/sparc64/kernel/binfmt_elf32.c
View file @
3389742f
/*
/*
* binfmt_elf32.c: Support 32-bit Sparc ELF binaries on Ultra.
* binfmt_elf32.c: Support 32-bit Sparc ELF binaries on Ultra.
*
*
* Copyright (C) 1995, 1996, 1997, 1998
David S. Miller
(davem@davemloft.net)
* Copyright (C) 1995, 1996, 1997, 1998
, 2008 David S. Miller
(davem@davemloft.net)
* Copyright (C) 1995, 1996, 1997, 1998 Jakub Jelinek (jj@ultra.linux.cz)
* Copyright (C) 1995, 1996, 1997, 1998 Jakub Jelinek (jj@ultra.linux.cz)
*/
*/
...
@@ -9,13 +9,6 @@
...
@@ -9,13 +9,6 @@
#define ELF_CLASS ELFCLASS32
#define ELF_CLASS ELFCLASS32
#define ELF_DATA ELFDATA2MSB;
#define ELF_DATA ELFDATA2MSB;
/* For the most part we present code dumps in the format
* Solaris does.
*/
typedef
unsigned
int
elf_greg_t
;
#define ELF_NGREG 38
typedef
elf_greg_t
elf_gregset_t
[
ELF_NGREG
];
/* Format is:
/* Format is:
* G0 --> G7
* G0 --> G7
* O0 --> O7
* O0 --> O7
...
@@ -23,25 +16,9 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
...
@@ -23,25 +16,9 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
* I0 --> I7
* I0 --> I7
* PSR, PC, nPC, Y, WIM, TBR
* PSR, PC, nPC, Y, WIM, TBR
*/
*/
#include <asm/psrcompat.h>
typedef
unsigned
int
elf_greg_t
;
#define ELF_CORE_COPY_REGS(__elf_regs, __pt_regs) \
#define ELF_NGREG 38
do { unsigned int *dest = &(__elf_regs[0]); \
typedef
elf_greg_t
elf_gregset_t
[
ELF_NGREG
];
struct pt_regs *src = (__pt_regs); \
unsigned int __user *sp; \
int i; \
for(i = 0; i < 16; i++) \
dest[i] = (unsigned int) src->u_regs[i];\
/* Don't try this at home kids... */
\
sp = (unsigned int __user *) (src->u_regs[14] & \
0x00000000fffffffc); \
for(i = 0; i < 16; i++) \
__get_user(dest[i+16], &sp[i]); \
dest[32] = tstate_to_psr(src->tstate); \
dest[33] = (unsigned int) src->tpc; \
dest[34] = (unsigned int) src->tnpc; \
dest[35] = src->y; \
dest[36] = dest[37] = 0;
/* XXX */
\
} while(0);
typedef
struct
{
typedef
struct
{
union
{
union
{
...
...
include/asm-sparc64/elf.h
View file @
3389742f
...
@@ -72,6 +72,8 @@
...
@@ -72,6 +72,8 @@
#define HWCAP_SPARC_BLKINIT 64
#define HWCAP_SPARC_BLKINIT 64
#define HWCAP_SPARC_N2 128
#define HWCAP_SPARC_N2 128
#define CORE_DUMP_USE_REGSET
/*
/*
* These are used to set parameters in the core dumps.
* These are used to set parameters in the core dumps.
*/
*/
...
@@ -80,10 +82,6 @@
...
@@ -80,10 +82,6 @@
#define ELF_CLASS ELFCLASS64
#define ELF_CLASS ELFCLASS64
#define ELF_DATA ELFDATA2MSB
#define ELF_DATA ELFDATA2MSB
typedef
unsigned
long
elf_greg_t
;
#define ELF_NGREG 36
typedef
elf_greg_t
elf_gregset_t
[
ELF_NGREG
];
/* Format of 64-bit elf_gregset_t is:
/* Format of 64-bit elf_gregset_t is:
* G0 --> G7
* G0 --> G7
* O0 --> O7
* O0 --> O7
...
@@ -94,24 +92,9 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
...
@@ -94,24 +92,9 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
* TNPC
* TNPC
* Y
* Y
*/
*/
#define ELF_CORE_COPY_REGS(__elf_regs, __pt_regs) \
typedef
unsigned
long
elf_greg_t
;
do { unsigned long *dest = &(__elf_regs[0]); \
#define ELF_NGREG 36
struct pt_regs *src = (__pt_regs); \
typedef
elf_greg_t
elf_gregset_t
[
ELF_NGREG
];
unsigned long __user *sp; \
int i; \
for(i = 0; i < 16; i++) \
dest[i] = src->u_regs[i]; \
/* Don't try this at home kids... */
\
sp = (unsigned long __user *) \
((src->u_regs[14] + STACK_BIAS) \
& 0xfffffffffffffff8UL); \
for(i = 0; i < 16; i++) \
__get_user(dest[i+16], &sp[i]); \
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
];
...
@@ -121,9 +104,6 @@ typedef struct {
...
@@ -121,9 +104,6 @@ typedef struct {
}
elf_fpregset_t
;
}
elf_fpregset_t
;
#endif
#endif
#define ELF_CORE_COPY_TASK_REGS(__tsk, __elf_regs) \
({ ELF_CORE_COPY_REGS((*(__elf_regs)), task_pt_regs(__tsk)); 1; })
/*
/*
* This is used to ensure we don't load something for the wrong architecture.
* This is used to ensure we don't load something for the wrong architecture.
*/
*/
...
...
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