PowerPC64 ELFv2 ABI: base support
This is the first patch of a series to implement support for the
PowerPC ELFv2 ABI. While powerpc64le-linux will use ELFv2, and
the existing powerpc64-linux code will continue to use ELFv1,
in theory ELFv2 is also defined for big-endian systems (and
ELFv1 was also defined for little-endian systems).
Therefore this patch adds a new tdep->elf_abi variable to decide
which ABI version to use. This is detected from the ELF header
e_flags value; if this is not present, we default to ELFv2 on
little-endian and ELFv1 otherwise.
This patch does not yet introduce any actual difference in GDB's
handling of the two ABIs. Those will be added by the remainder
of this patch series.
For an overview of the changes in ELFv2, have a look at the
comments in the patch series that added ELFv2 to GCC, starting at:
http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01144.html
gdb/ChangeLog:
* ppc-tdep.h (enum powerpc_elf_abi): New data type.
(struct gdbarch_tdep): New member elf_abi.
* rs6000-tdep.c: Include "elf/ppc64.h".
(rs6000_gdbarch_init): Detect ELF ABI version.