fix-dwarf-fdpic.uclibc-ng 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. diff -Nur gcc-6.3.0.orig/libgcc/unwind-dw2-fde-dip.c gcc-6.3.0/libgcc/unwind-dw2-fde-dip.c
  2. --- gcc-6.3.0.orig/libgcc/unwind-dw2-fde-dip.c 2016-01-04 15:30:50.000000000 +0100
  3. +++ gcc-6.3.0/libgcc/unwind-dw2-fde-dip.c 2017-05-18 00:43:58.000000000 +0200
  4. @@ -124,7 +124,11 @@
  5. {
  6. _Unwind_Ptr pc_low;
  7. _Unwind_Ptr pc_high;
  8. +#if defined __FRV_FDPIC__ || defined __BFIN_FDPIC__ || defined __SH_FDPIC__
  9. + struct elf32_fdpic_loadaddr load_base;
  10. +#else
  11. _Unwind_Ptr load_base;
  12. +#endif
  13. const ElfW(Phdr) *p_eh_frame_hdr;
  14. const ElfW(Phdr) *p_dynamic;
  15. struct frame_hdr_cache_element *link;
  16. @@ -163,7 +167,7 @@
  17. struct unw_eh_callback_data *data = (struct unw_eh_callback_data *) ptr;
  18. const ElfW(Phdr) *phdr, *p_eh_frame_hdr, *p_dynamic;
  19. long n, match;
  20. -#ifdef __FRV_FDPIC__
  21. +#if defined __FRV_FDPIC__ || defined __BFIN_FDPIC__ || defined __SH_FDPIC__
  22. struct elf32_fdpic_loadaddr load_base;
  23. #else
  24. _Unwind_Ptr load_base;
  25. @@ -347,7 +351,7 @@
  26. break;
  27. }
  28. }
  29. -# elif defined __FRV_FDPIC__ && defined __linux__
  30. +# elif (defined __FRV_FDPIC__ || defined __BFIN_FDPIC__) || defined __SH_FDPIC__ && defined __linux__
  31. data->dbase = load_base.got_value;
  32. # else
  33. # error What is DW_EH_PE_datarel base on this platform?