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
b053c98f
Commit
b053c98f
authored
Jan 26, 2005
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix register layout in o32 core dumps on 64-bit systems.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
c83cfc9c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
13 deletions
+18
-13
arch/mips/kernel/binfmt_elfo32.c
arch/mips/kernel/binfmt_elfo32.c
+18
-13
No files found.
arch/mips/kernel/binfmt_elfo32.c
View file @
b053c98f
...
...
@@ -98,7 +98,7 @@ struct elf_prpsinfo32
#define init_elf_binfmt init_elf32_binfmt
#define jiffies_to_timeval jiffies_to_compat_timeval
static
__inline__
void
static
inline
void
jiffies_to_compat_timeval
(
unsigned
long
jiffies
,
struct
compat_timeval
*
value
)
{
/*
...
...
@@ -113,21 +113,26 @@ jiffies_to_compat_timeval(unsigned long jiffies, struct compat_timeval *value)
#undef ELF_CORE_COPY_REGS
#define ELF_CORE_COPY_REGS(_dest,_regs) elf32_core_copy_regs(_dest,_regs);
void
elf32_core_copy_regs
(
elf_gregset_t
_dest
,
struct
pt_regs
*
_
regs
)
void
elf32_core_copy_regs
(
elf_gregset_t
grp
,
struct
pt_regs
*
regs
)
{
int
i
;
memset
(
_dest
,
0
,
sizeof
(
elf_gregset_t
));
/* XXXKW the 6 is from EF_REG0 in gdb/gdb/mips-linux-tdep.c, include/asm-mips/reg.h */
for
(
i
=
6
;
i
<
38
;
i
++
)
_dest
[
i
]
=
(
elf_greg_t
)
_regs
->
regs
[
i
-
6
];
_dest
[
i
++
]
=
(
elf_greg_t
)
_regs
->
lo
;
_dest
[
i
++
]
=
(
elf_greg_t
)
_regs
->
hi
;
_dest
[
i
++
]
=
(
elf_greg_t
)
_regs
->
cp0_epc
;
_dest
[
i
++
]
=
(
elf_greg_t
)
_regs
->
cp0_badvaddr
;
_dest
[
i
++
]
=
(
elf_greg_t
)
_regs
->
cp0_status
;
_dest
[
i
++
]
=
(
elf_greg_t
)
_regs
->
cp0_cause
;
for
(
i
=
0
;
i
<
EF_R0
;
i
++
)
grp
[
i
]
=
0
;
grp
[
EF_R0
]
=
0
;
for
(
i
=
1
;
i
<=
31
;
i
++
)
grp
[
EF_R0
+
i
]
=
(
elf_greg_t
)
regs
->
regs
[
i
];
grp
[
EF_R26
]
=
0
;
grp
[
EF_R27
]
=
0
;
grp
[
EF_LO
]
=
(
elf_greg_t
)
regs
->
lo
;
grp
[
EF_HI
]
=
(
elf_greg_t
)
regs
->
hi
;
grp
[
EF_CP0_EPC
]
=
(
elf_greg_t
)
regs
->
cp0_epc
;
grp
[
EF_CP0_BADVADDR
]
=
(
elf_greg_t
)
regs
->
cp0_badvaddr
;
grp
[
EF_CP0_STATUS
]
=
(
elf_greg_t
)
regs
->
cp0_status
;
grp
[
EF_CP0_CAUSE
]
=
(
elf_greg_t
)
regs
->
cp0_cause
;
#ifdef EF_UNUSED0
grp
[
EF_UNUSED0
]
=
0
;
#endif
}
MODULE_DESCRIPTION
(
"Binary format loader for compatibility with o32 Linux/MIPS binaries"
);
...
...
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