Hi, we are currently working on the use of the arm ehabi for Ada exceptions, and we aren't sure about which encoding has to be used for ttype.
The patch http://gcc.gnu.org/ml/gcc-patches/2011-09/msg00765.html explains that on `Older ARM EABI toolchains set this value [ttype_encoding] incorrectly`, and added the _GLIBCXX_OVERRIDE_TTYPE_ENCODING workaround. But that patch doesn't change it: in gcc/config/arm/arm.h, ASM_PREFERRED_EH_DATA_FORMAT is defined only if ARM_TARGET2_DWARF_FORMAT isn't. We are not sure wether this is the intent or an overlook. The position of the #endif is important: --- gcc/config/arm/arm.h (revision 178807) +++ gcc/config/arm/arm.h (working copy) @@ -825,6 +825,16 @@ extern int arm_arch_thumb_hwdiv; #define ARM_EH_STACKADJ_REGNUM 2 #define EH_RETURN_STACKADJ_RTX gen_rtx_REG (SImode, ARM_EH_STACKADJ_REGNUM) +#ifndef ARM_TARGET2_DWARF_FORMAT +#define ARM_TARGET2_DWARF_FORMAT DW_EH_PE_pcrel + +/* ttype entries (the only interesting data references used) + use TARGET2 relocations. */ +#define ASM_PREFERRED_EH_DATA_FORMAT(code, data) \ + (((code) == 0 && (data) == 1 && ARM_UNWIND_INFO) ? ARM_TARGET2_DWARF_FORMAT \ + : DW_EH_PE_absptr) +#endif + /* The native (Norcroft) Pascal compiler for the ARM passes the static chain as an invisible last argument (possible since varargs don't exist in Pascal), so the following is not true. */ Can this be clarified ? Thanks, Tristan.