This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Are ppc*_elf_write_core_note Os-specific?


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.

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.

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]