PowerPC64 EH encoding

Alan Modra amodra@bigpond.net.au
Thu Sep 5 20:15:00 GMT 2002


PowerPC64 Linux inherits the rs6000/sysv4.h definition for EH data
format, which means we end up with the absolute form even in
shared libs.  This patch moves to using pcrel type data all the time.

	* config/rs6000/linux64.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.

OK mainline and branch?

Index: gcc/config/rs6000/linux64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/linux64.h,v
retrieving revision 1.26
diff -u -p -r1.26 linux64.h
--- gcc/config/rs6000/linux64.h	27 Aug 2002 14:55:42 -0000	1.26
+++ gcc/config/rs6000/linux64.h	6 Sep 2002 03:06:53 -0000
@@ -357,3 +357,10 @@ while (0)
 /* Override sysv4.h as these are ABI_V4 only.  */
 #undef	ASM_OUTPUT_REG_PUSH
 #undef	ASM_OUTPUT_REG_POP
+
+/* 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) \
+  (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_udata8)

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Gcc-patches mailing list