This is the mail archive of the
mailing list for the binutils project.
Re: Are ppc*_elf_write_core_note Os-specific?
- From: Alan Modra <amodra at gmail dot com>
- To: John Baldwin <jhb at freebsd dot org>
- Cc: binutils at sourceware dot org
- Date: Tue, 19 Jan 2016 10:48:19 +1030
- Subject: Re: Are ppc*_elf_write_core_note Os-specific?
- Authentication-results: sourceware.org; auth=none
- References: <1736699 dot V7zq9VJIrx at ralph dot baldwin dot cx>
I guess so. They match the Linux prstatus_t and prpsinfo_t.
On Mon, Jan 18, 2016 at 09:40:00AM -0800, John Baldwin wrote:
> For FreeBSD (and possibly other systems), I think it would be ideal if
> ppc*_elf_write_core_note were not defined if the current versions are
> indeed OS specific.
It does look as if the generic elf.c:elfcore_write_prstatus might work
for PowerPC and PowerPC64 Linux. Hmm, No.
https://www.sourceware.org/ml/binutils/2006-12/msg00205.html says that
I added the backend functions "for targets like powerpc where glibc
doesn't define the 32-bit typedefs". ie. prstatus32_t. So it's for
when we have a 32-bit process running on a 64-bit system, and glibc is
PowerPC64 glibc even now doesn't defing prstatus32_t. :-( It seems
only sparc and s390 do so. So PowerPC would need a
hosts/powerpc-linux.h to define them for Linux, with some configury
changes, like hosts/x86-64linux.h does for x86-64 Linux. I'll see
about making those changes.
Note that elf_backend_write_core_note is defined for x86-64, arm and
aarch64 too. The ARM and AARCH64 functions look to be completely
redundant, and I suspect all of them could disappear if we modify the
generic code to handle prstatusx32_t for x86-64.
Australia Development Lab, IBM