This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Are ppc*_elf_write_core_note Os-specific?
- From: John Baldwin <jhb at freebsd dot org>
- To: Alan Modra <amodra at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 18 Jan 2016 17:15:28 -0800
- 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> <20160119001819 dot GB17028 at bubble dot grove dot modra dot org>
On Tuesday, January 19, 2016 10:48:19 AM Alan Modra wrote:
> 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
> lacking.
>
> 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.
Ok, thanks!
> 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.
Agreed.
--
John Baldwin