diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2014-02-04 18:38:56 +0100 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2014-02-04 18:38:56 +0100 |
commit | cd453cd072004d26ede355b850b3831acffaeddd (patch) | |
tree | 04473bb2ed749e0e160232241e6a5a84d8d49bbf /gdb/ppc-tdep.h | |
parent | 0ff3e01fdc67a3842ee54224cf197e9a55f0a750 (diff) | |
download | gdb-cd453cd072004d26ede355b850b3831acffaeddd.zip gdb-cd453cd072004d26ede355b850b3831acffaeddd.tar.gz gdb-cd453cd072004d26ede355b850b3831acffaeddd.tar.bz2 |
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.
Diffstat (limited to 'gdb/ppc-tdep.h')
-rw-r--r-- | gdb/ppc-tdep.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/ppc-tdep.h b/gdb/ppc-tdep.h index e6a19b2..08554ff 100644 --- a/gdb/ppc-tdep.h +++ b/gdb/ppc-tdep.h @@ -182,6 +182,15 @@ extern void ppc_collect_vsxregset (const struct regset *regset, /* Private data that this module attaches to struct gdbarch. */ +/* ELF ABI version used by the inferior. */ +enum powerpc_elf_abi +{ + POWERPC_ELF_AUTO, + POWERPC_ELF_V1, + POWERPC_ELF_V2, + POWERPC_ELF_LAST +}; + /* Vector ABI used by the inferior. */ enum powerpc_vector_abi { @@ -197,6 +206,8 @@ struct gdbarch_tdep int wordsize; /* Size in bytes of fixed-point word. */ int soft_float; /* Avoid FP registers for arguments? */ + enum powerpc_elf_abi elf_abi; /* ELF ABI version. */ + /* How to pass vector arguments. Never set to AUTO or LAST. */ enum powerpc_vector_abi vector_abi; |