------- Comment #3 from jakub at gcc dot gnu dot org  2006-02-01 10:17 -------
For the first problem, you can use something like:

+#if FFI_TRAMPOLINE_SIZE == 10
+/* Precalculated for crappy assemblers.  */
+#define RAW_CLOSURE_CIF_OFFSET 12
+#define RAW_CLOSURE_FUN_OFFSET 16
+#define RAW_CLOSURE_USER_DATA_OFFSET 20
+#else
 #define RAW_CLOSURE_CIF_OFFSET ((FFI_TRAMPOLINE_SIZE + 3) & ~3)
 #define RAW_CLOSURE_FUN_OFFSET (RAW_CLOSURE_CIF_OFFSET + 4)
 #define RAW_CLOSURE_USER_DATA_OFFSET (RAW_CLOSURE_FUN_OFFSET + 4)
+#endif
 #define CIF_FLAGS_OFFSET 20

(untested).  For the second, you should do whatever GCC emits in -fpic
.eh_frame on your platform. i386/sol2.h has:
/* Old versions of the Solaris assembler can not handle the difference of
   labels in different sections, so force DW_EH_PE_datarel.  */
#undef ASM_PREFERRED_EH_DATA_FORMAT
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)                       \
  (flag_pic ? ((GLOBAL ? DW_EH_PE_indirect : 0)                         \
               | (TARGET_64BIT ? DW_EH_PE_pcrel | DW_EH_PE_sdata4       \
                  : DW_EH_PE_datarel))                                  \
   : DW_EH_PE_absptr)
That means adding the some configury bits to detect that, set some macro
and #if defined __PIC__ && USE_EH_FRAME_DATAREL
datarel encoded stuff
#elif defined __PIC
pcrel encoded stuff
#else
absolute encoded stuff
#endif


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26048

Reply via email to