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]

i386 read-only eh data


Tested on linux.  Those with other x86 systems please test
this as soon as possible with -fpic.  As the comment says,
it *ought* to work, but no telling what sorts of assembler
limitations we'll run into.


r~


        * config/i386/i386.h (ASM_PREFERRED_EH_DATA_FORMAT): New.

Index: i386.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.h,v
retrieving revision 1.147.2.4
diff -c -p -d -r1.147.2.4 i386.h
*** i386.h	2001/05/13 07:10:09	1.147.2.4
--- i386.h	2001/05/16 22:45:37
*************** extern int const svr4_dbx_register_map[F
*** 2641,2646 ****
--- 2641,2658 ----
  #define EH_RETURN_DATA_REGNO(N)       ((N) < 2 ? (N) : INVALID_REGNUM)
  #define EH_RETURN_STACKADJ_RTX        gen_rtx_REG (Pmode, 2)
  
+ /* 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.
+ 
+    ??? All x86 object file formats are capable of representing this.
+    After all, the relocation needed is the same as for the call insn.
+    Whether or not a particular assembler allows us to enter such, I
+    guess we'll have to see.  */
+ #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)       		\
+   (flag_pic ? (GLOBAL ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel		\
+    : DW_EH_PE_absptr)
+ 
  /* This is how to output the definition of a user-level label named NAME,
     such as the label on a static function or variable NAME.  */
  


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