This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] fix PR68468
- From: Waldemar Brodkorb <wbx at openadk dot org>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Cc: thomas dot petazzoni at free-electrons dot com, aoliva at redhat dot com
- Date: Sat, 5 Nov 2016 18:14:18 +0100
- Subject: [PATCH] fix PR68468
- Authentication-results: sourceware.org; auth=none
- Reply-to: Waldemar Brodkorb <wbx at openadk dot org>
Hi,
the following patch fixes PR68468.
Patch is used for a while in Buildroot without issues.
2016-11-05 Waldemar Brodkorb <wbx@openadk.org>
PR gcc/68468
* libgcc/unwind-dw2-fde-dip.c: fix build on FDPIC targets.
diff --git a/libgcc/unwind-dw2-fde-dip.c b/libgcc/unwind-dw2-fde-dip.c
index f7a1c3f..801bce8 100644
--- a/libgcc/unwind-dw2-fde-dip.c
+++ b/libgcc/unwind-dw2-fde-dip.c
@@ -124,7 +124,11 @@ static struct frame_hdr_cache_element
{
_Unwind_Ptr pc_low;
_Unwind_Ptr pc_high;
+#if defined __FRV_FDPIC__ || defined __BFIN_FDPIC__
+ struct elf32_fdpic_loadaddr load_base;
+#else
_Unwind_Ptr load_base;
+#endif
const ElfW(Phdr) *p_eh_frame_hdr;
const ElfW(Phdr) *p_dynamic;
struct frame_hdr_cache_element *link;
@@ -163,7 +167,7 @@ _Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr)
struct unw_eh_callback_data *data = (struct unw_eh_callback_data *) ptr;
const ElfW(Phdr) *phdr, *p_eh_frame_hdr, *p_dynamic;
long n, match;
-#ifdef __FRV_FDPIC__
+#if defined __FRV_FDPIC__ || defined __BFIN_FDPIC__
struct elf32_fdpic_loadaddr load_base;
#else
_Unwind_Ptr load_base;
@@ -347,7 +351,7 @@ _Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr)
break;
}
}
-# elif defined __FRV_FDPIC__ && defined __linux__
+# elif (defined __FRV_FDPIC__ || defined __BFIN_FDPIC__) && defined __linux__
data->dbase = load_base.got_value;
# else
# error What is DW_EH_PE_datarel base on this platform?
Best regards
Waldemar