From 431390d872bbda11c71f6cbf5aba8caf3df0e638 Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Wed, 12 Apr 2017 11:55:14 +0200 Subject: [PATCH] brutally use absolute addresses in exception handling tables and stick them in .data (for now) --- gcc/gcc/config/rs6000/macos.h | 9 +++++++++ libretro/ppcstart.c | 2 ++ 2 files changed, 11 insertions(+) diff --git a/gcc/gcc/config/rs6000/macos.h b/gcc/gcc/config/rs6000/macos.h index 46a0b7b7d8..17cc37610d 100644 --- a/gcc/gcc/config/rs6000/macos.h +++ b/gcc/gcc/config/rs6000/macos.h @@ -196,6 +196,15 @@ collect has a chance to see them, so scan the object files directly. */ #define COLLECT_EXPORT_LIST +/* Select a format to encode pointers in exception handling data. CODE + is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is + true if the symbol may be affected by dynamic relocations. */ +#undef ASM_PREFERRED_EH_DATA_FORMAT +#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \ + (DW_EH_PE_absptr) +#undef EH_TABLES_CAN_BE_READ_ONLY +#define EH_TABLES_CAN_BE_READ_ONLY 0 + #if 0 /* On AIX, initialisers specified with -binitfini are called in breadth-first order. diff --git a/libretro/ppcstart.c b/libretro/ppcstart.c index 4adead8fab..b6ea38b42a 100644 --- a/libretro/ppcstart.c +++ b/libretro/ppcstart.c @@ -37,3 +37,5 @@ void __start() } exit(result); } + +void *__dso_handle = &__dso_handle;