glibc-2.1.3, asm/elf.h and PPC kernels with AltiVec support
Mark Kettenis
kettenis@wins.uva.nl
Thu Feb 3 16:18:00 GMT 2000
Date: Thu, 3 Feb 2000 15:04:38 -0800
From: Geoff Keating <geoffk@cygnus.com>
> From: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
> Date: Thu, 3 Feb 2000 22:19:51 +0100
> Cc: Andreas Tobler <toa@pop.agri.ch>
> >I think the correct fix would be a separate sys/elf.h for PPC, like what
> >x86 and arm already do.
I think this is OK in principle. We're trying to move away from using
kernel header files.
But I'm not sure whether adding a seperate sys/elf.h for PPC is a good
idea. Why not add the necessary types directly to sys/procfs.h? IMHO
adding sys/elf.h for i386 was a mistake. Simply copying the mistakes
that were made for i386 to PPC doesn't seem very productive to me.
The reason for the existence of sys/procfs.h is for the definitions
for the layout of the special sections in ELF core-dumps. The kernel
uses names prefixed with elf_, but the kernel headers make them also
available under the traditional SVR4 names. In principle only these
(thus without the elf_ prefix) are needed by GDB so one might choose
to export these only.
There is one caveat though. The register sets used in core-dumps
might differ from those used in signal contexts/user contexts. This
happens on Solaris and Linux/i386. That's why prgregset_t and
prfpregset_t exist. On PPC the register sets seem to be identical so
the `typedef gregset_t prgregset_t' in sys/procfs.h is probably right.
> >If there are no objections, I'll put together such a file and post it later
> >today with the corresponding changes to other files.
This seems to be missing a lot of stuff. In particular, the
ELF_EXEC_PAGESIZE and ELF_CORE_COPY_REGS macros.
Are these really meant to be used in userspace? GDB doens't use
them. I doubt that they're really needed.
Mark
More information about the Libc-alpha
mailing list