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:
Roland McGrath 2004-02-01 22:35:15 +00:00
parent 4e73f23d28
commit cbb685f35a

View file

@ -271,6 +271,8 @@ linux_make_note_section (bfd *obfd, int *note_size)
char psargs[80] = { '\0' };
char *note_data = NULL;
ptid_t current_ptid = inferior_ptid;
char *auxv;
int auxv_len;
if (get_exec_file (0))
{
@ -305,6 +307,14 @@ linux_make_note_section (bfd *obfd, int *note_size)
note_data = thread_args.note_data;
}
auxv_len = target_auxv_read (&current_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);
return note_data;
}