This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: Does your .eh_frame_hdr change work with DW_EH_PE_absptr?


On Thu, Feb 14, 2002 at 12:58:56PM -0800, H . J . Lu wrote:
> 2002-02-14  H.J. Lu <hjl@gnu.org>
> 
> 	* config/mips/linux.h (ASM_PREFERRED_EH_DATA_FORMAT): New.
> 
> --- gcc/config/mips/linux.h.eh	Fri Feb  8 17:33:04 2002
> +++ gcc/config/mips/linux.h	Thu Feb 14 12:25:22 2002
> @@ -283,6 +283,9 @@ void FN ()							\
>     pseudo-ops.  */
>  #define FUNCTION_NAME_ALREADY_DECLARED
>  
> +#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)       \
> +  (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4)
> +
>  /* The glibc _mcount stub will save $v0 for us.  Don't mess with saving
>     it, since ASM_OUTPUT_REG_PUSH/ASM_OUTPUT_REG_POP do not work in the
>     presence of $gp-relative calls.  */

Well, if MIPS supports PC relative relocs (R_MIPS_REL32?) using
.4byte $LFB1 - .
or some other assembly syntax, you should definitely go for
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL)                      \
  (flag_pic                                                             \
    ? ((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4\
   : DW_EH_PE_absptr)

This is independent from need to fix ld.

	Jakub


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