aboutsummaryrefslogtreecommitdiff
path: root/libgcc/unwind-dw2-fde-dip.c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2016-11-16 07:01:56 +0000
committerJakub Jelinek <jakub@redhat.com>2016-11-16 07:01:56 +0000
commit82f99b05fde4629d33fdd90876b0ff638822f770 (patch)
tree6e949d13e6737695b8f426f0c11a3dcb47bdaae1 /libgcc/unwind-dw2-fde-dip.c
parentb407f21bb271170b70ad78acfd156477c0e3eb7e (diff)
PR libgcc/68468
* unwind-dw2-fde-dip.c: Fix build on FDPIC targets. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@242468 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc/unwind-dw2-fde-dip.c')
-rw-r--r--libgcc/unwind-dw2-fde-dip.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libgcc/unwind-dw2-fde-dip.c b/libgcc/unwind-dw2-fde-dip.c
index f7a1c3fd1cf..801bce8fa3d 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?