This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [libffi] Use datarel encoding in libffi .eh_frame on Solaris 2/x86
- From: Richard Henderson <rth at redhat dot com>
- To: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- Cc: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org, Anthony Green <green at redhat dot com>, Jakub Jelinek <jakub at redhat dot com>
- Date: Fri, 26 Nov 2010 11:15:19 -0800
- Subject: Re: [libffi] Use datarel encoding in libffi .eh_frame on Solaris 2/x86
- References: <yddoc9brkjo.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
On 11/26/2010 10:45 AM, Rainer Orth wrote:
> * src/x86/sysv.S (.eh_frame) [__PIC__ && __sun__ && __svr4__]: Use
> datarel encoding.
> (.LASFDE1) [__PIC__ && __sun__ && __svr4__]: Use @GOTOFF for FDE
> initial location.
> (.LASFDE2, LASFDE3): Likewise.
This is getting complex enough that I think we should not
replicate this logic 4 times. Would you please pull this
out into a set of macros near the top of the file? E.g.
#if defined __PIC__
# if defined __sun__ && defined __svr4__
# define FDE_ENCODING 0x30 /* datarel */
# define FDE_ENCODE(X) X@GOTOFF
# else
# define FDE_ENCODING 0x1b /* pcrel sdata4 */
# if defined HAVE_AS_X86_PCREL
# define FDE_ENCODE(X) X-.
# else
# define FDE_ENCODE(X) X@rel
# endif
# endif
#else
# define FDE_ENCODING 0 /* absolute */
# define FDE_ENCODE(X) X
#endif
And, frankly, for gcc 4.7 we ought to consider requiring a
recent version of binutils and scrap all of this explicit
unwind info in favor of CFI directives.
r~