This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

fix -mrelocatable EH problem on powerpc



This fixes the build failure caused by wrong relocations in EH
information.

Tested on powerpc-eabisim.

-- 
Geoff Keating <geoffk@redhat.com>

===File ~/patches/rs6000-eh-relocatable.patch===============
2001-05-15  Geoffrey Keating  <geoffk@redhat.com>

	* config/rs6000/sysv4.h (ASM_PREFERRED_EH_DATA_FORMAT): Treat
	TARGET_RELOCATABLE like flag_pic for now.

Index: config/rs6000/sysv4.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/sysv4.h,v
retrieving revision 1.47
diff -p -u -p -r1.47 sysv4.h
--- sysv4.h	2001/05/14 03:40:04	1.47
+++ sysv4.h	2001/05/15 19:49:05
@@ -1599,9 +1599,9 @@ do {									\
 /* 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.  */
-#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)      			     \
-  (flag_pic 								     \
+#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)			     \
+  ((flag_pic || TARGET_RELOCATABLE)					     \
    ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4) \
    : DW_EH_PE_absptr)
- 
+
 #define EXCEPTION_SECTION readonly_data_section
============================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]