diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/binutils/include/elf/common.h | 4 | ||||
-rw-r--r-- | contrib/gcc/config/arm/freebsd.h | 1 | ||||
-rw-r--r-- | contrib/gcc/config/arm/unwind-arm.h | 4 | ||||
-rw-r--r-- | contrib/gdb/gdb/osabi.c | 14 | ||||
-rw-r--r-- | contrib/libstdc++/libsupc++/unwind-cxx.h | 20 |
5 files changed, 32 insertions, 11 deletions
diff --git a/contrib/binutils/include/elf/common.h b/contrib/binutils/include/elf/common.h index bb50a5c..f2e5022 100644 --- a/contrib/binutils/include/elf/common.h +++ b/contrib/binutils/include/elf/common.h @@ -435,6 +435,10 @@ #define NT_FREEBSD_ABI_TAG 1 +/* Values for FreeBSD .note.tag notes. Note name is "FreeBSD". */ + +#define NT_FREEBSD_TAG 2 + /* These three macros disassemble and assemble a symbol table st_info field, which contains the symbol binding and symbol type. The STB_ and STT_ defines identify the binding and type. */ diff --git a/contrib/gcc/config/arm/freebsd.h b/contrib/gcc/config/arm/freebsd.h index 04be692..8b03615 100644 --- a/contrib/gcc/config/arm/freebsd.h +++ b/contrib/gcc/config/arm/freebsd.h @@ -85,6 +85,7 @@ while (false) #else /* Default it to use ATPCS with soft-VFP. */ +#undef TARGET_DEFAULT #define TARGET_DEFAULT \ (MASK_APCS_FRAME \ | TARGET_ENDIAN_DEFAULT) diff --git a/contrib/gcc/config/arm/unwind-arm.h b/contrib/gcc/config/arm/unwind-arm.h index a3040d7..0811f2c 100644 --- a/contrib/gcc/config/arm/unwind-arm.h +++ b/contrib/gcc/config/arm/unwind-arm.h @@ -87,7 +87,7 @@ extern "C" { struct _Unwind_Control_Block { - char exception_class[8]; + unsigned exception_class __attribute__((__mode__(__DI__))); void (*exception_cleanup)(_Unwind_Reason_Code, _Unwind_Control_Block *); /* Unwinder cache, private fields for the unwinder's use */ struct @@ -186,7 +186,7 @@ extern "C" { /* Support functions for the PR. */ #define _Unwind_Exception _Unwind_Control_Block - typedef char _Unwind_Exception_Class[8]; + typedef unsigned _Unwind_Exception_Class __attribute__((__mode__(__DI__))); void * _Unwind_GetLanguageSpecificData (_Unwind_Context *); _Unwind_Ptr _Unwind_GetRegionStart (_Unwind_Context *); diff --git a/contrib/gdb/gdb/osabi.c b/contrib/gdb/gdb/osabi.c index 3acfc70..4e43df5 100644 --- a/contrib/gdb/gdb/osabi.c +++ b/contrib/gdb/gdb/osabi.c @@ -463,6 +463,20 @@ generic_elf_osabi_sniff_abi_tag_sections: unknown OS number %d", return; } + + /* .note.tag notes, used by FreeBSD. */ + if (strcmp (name, ".note.tag") == 0) + { + /* FreeBSD. */ + if (check_note (abfd, sect, note, "FreeBSD", 4, NT_FREEBSD_TAG)) + { + /* There is no need to check the version yet. */ + *osabi = GDB_OSABI_FREEBSD_ELF; + return; + } + + return; + } /* .note.netbsd.ident notes, used by NetBSD. */ if (strcmp (name, ".note.netbsd.ident") == 0 diff --git a/contrib/libstdc++/libsupc++/unwind-cxx.h b/contrib/libstdc++/libsupc++/unwind-cxx.h index c5636556..523c054 100644 --- a/contrib/libstdc++/libsupc++/unwind-cxx.h +++ b/contrib/libstdc++/libsupc++/unwind-cxx.h @@ -173,7 +173,7 @@ __get_exception_header_from_ue (_Unwind_Exception *exc) return reinterpret_cast<__cxa_exception *>(exc + 1) - 1; } -#ifdef __ARM_EABI_UNWINDER__ +#if defined(__ARM_EABI_UNWINDER__) && !defined(__FreeBSD__) static inline bool __is_gxx_exception_class(_Unwind_Exception_Class c) { @@ -200,13 +200,7 @@ __GXX_INIT_EXCEPTION_CLASS(_Unwind_Exception_Class c) c[6] = '+'; c[7] = '\0'; } - -static inline void* -__gxx_caught_object(_Unwind_Exception* eo) -{ - return (void*)eo->barrier_cache.bitpattern[0]; -} -#else // !__ARM_EABI_UNWINDER__ +#else // !__ARM_EABI_UNWINDER__ || __FreeBSD__ // This is the exception class we report -- "GNUCC++\0". const _Unwind_Exception_Class __gxx_exception_class = ((((((((_Unwind_Exception_Class) 'G' @@ -223,8 +217,16 @@ __is_gxx_exception_class(_Unwind_Exception_Class c) { return c == __gxx_exception_class; } - #define __GXX_INIT_EXCEPTION_CLASS(c) c = __gxx_exception_class +#endif + +#ifdef __ARM_EABI_UNWINDER__ +static inline void* +__gxx_caught_object(_Unwind_Exception* eo) +{ + return (void*)eo->barrier_cache.bitpattern[0]; +} +#else // !__ARM_EABI_UNWINDER__ // GNU C++ personality routine, Version 0. extern "C" _Unwind_Reason_Code __gxx_personality_v0 |