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
5fd43b38
Commit
5fd43b38
authored
Oct 02, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ELF]: Handle auxv bits more cleanly in mixed 32/64 bit environments.
parent
d302b497
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
fs/binfmt_elf.c
fs/binfmt_elf.c
+9
-5
No files found.
fs/binfmt_elf.c
View file @
5fd43b38
...
...
@@ -169,7 +169,7 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr * exec,
}
/* Create the ELF interpreter info */
elf_info
=
current
->
mm
->
saved_auxv
;
elf_info
=
(
elf_addr_t
*
)
current
->
mm
->
saved_auxv
;
#define NEW_AUX_ENT(id, val) \
do { elf_info[ei_index++] = id; elf_info[ei_index++] = val; } while (0)
...
...
@@ -197,8 +197,10 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr * exec,
if
(
k_platform
)
{
NEW_AUX_ENT
(
AT_PLATFORM
,
(
elf_addr_t
)(
long
)
u_platform
);
}
NEW_AUX_ENT
(
AT_NULL
,
0
);
#undef NEW_AUX_ENT
/* AT_NULL is zero; clear the rest too */
memset
(
&
elf_info
[
ei_index
],
0
,
sizeof
current
->
mm
->
saved_auxv
-
ei_index
*
sizeof
elf_info
[
0
]);
sp
=
STACK_ADD
(
p
,
ei_index
);
...
...
@@ -1209,6 +1211,7 @@ static int elf_core_dump(long signr, struct pt_regs * regs, struct file * file)
elf_fpxregset_t
*
xfpu
=
NULL
;
#endif
int
thread_status_size
=
0
;
elf_addr_t
*
auxv
;
/*
* We no longer stop all VM operations.
...
...
@@ -1290,13 +1293,14 @@ static int elf_core_dump(long signr, struct pt_regs * regs, struct file * file)
numnote
=
3
;
auxv
=
(
elf_addr_t
*
)
current
->
mm
->
saved_auxv
;
i
=
0
;
do
i
+=
2
;
while
(
current
->
mm
->
saved_
auxv
[
i
-
2
]
!=
AT_NULL
);
while
(
auxv
[
i
-
2
]
!=
AT_NULL
);
fill_note
(
&
notes
[
numnote
++
],
"CORE"
,
NT_AUXV
,
i
*
sizeof
current
->
mm
->
saved_auxv
[
0
],
current
->
mm
->
saved_auxv
);
i
*
sizeof
(
elf_addr_t
),
auxv
);
/* Try to dump the FPU. */
if
((
prstatus
->
pr_fpvalid
=
elf_core_copy_task_fpregs
(
current
,
regs
,
fpu
)))
...
...
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