2004-01-28 Roland McGrath <roland@redhat.com>
* procfs.c (procfs_make_note_section): If we can read TARGET_OBJECT_AUXV data, add an NT_AUXV note containing it. * linux-proc.c (linux_make_note_section): Likewise.
This commit is contained in:
parent
4e73f23d28
commit
cbb685f35a
1 changed files with 18 additions and 8 deletions
|
@ -271,6 +271,8 @@ linux_make_note_section (bfd *obfd, int *note_size)
|
||||||
char psargs[80] = { '\0' };
|
char psargs[80] = { '\0' };
|
||||||
char *note_data = NULL;
|
char *note_data = NULL;
|
||||||
ptid_t current_ptid = inferior_ptid;
|
ptid_t current_ptid = inferior_ptid;
|
||||||
|
char *auxv;
|
||||||
|
int auxv_len;
|
||||||
|
|
||||||
if (get_exec_file (0))
|
if (get_exec_file (0))
|
||||||
{
|
{
|
||||||
|
@ -305,6 +307,14 @@ linux_make_note_section (bfd *obfd, int *note_size)
|
||||||
note_data = thread_args.note_data;
|
note_data = thread_args.note_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auxv_len = target_auxv_read (¤t_target, &auxv);
|
||||||
|
if (auxv_len > 0)
|
||||||
|
{
|
||||||
|
note_data = elfcore_write_note (obfd, note_data, note_size,
|
||||||
|
"CORE", NT_AUXV, auxv, auxv_len);
|
||||||
|
xfree (auxv);
|
||||||
|
}
|
||||||
|
|
||||||
make_cleanup (xfree, note_data);
|
make_cleanup (xfree, note_data);
|
||||||
return note_data;
|
return note_data;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue