summaryrefslogtreecommitdiff
path: root/libffi
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-01 13:15:28 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-01 13:15:28 +0000
commitfeeb6596a18e42225d0f25a03b35c564d9a10ebb (patch)
tree7e6fb5e50aa3f901480410fc04ba058b6f0e94fa /libffi
parentacc16a01c06415b69d0a54c9e86f4ec72665ee54 (diff)
downloadgcc-feeb6596a18e42225d0f25a03b35c564d9a10ebb.tar.gz
2010-12-01 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 167323 2010-12-01 Basile Starynkevitch <basile@starynkevitch.net> {{merged with trunk rev 167323, and regenerated}} * melt/generated/warmelt-normatch.0+01.c: Regenerate. * melt/generated/warmelt-first.0.c: Regenerate. * melt/generated/warmelt-normal.0.c: Regenerate. * melt/generated/warmelt-normatch.0+03.c: Regenerate. * melt/generated/warmelt-macro.0.c: Regenerate. * melt/generated/warmelt-outobj.0.c: Regenerate. * melt/generated/warmelt-genobj.0.c: Regenerate. * melt/generated/warmelt-normal.0+01.c: Regenerate. * melt/generated/warmelt-normal.0+02.c: Regenerate. * melt/generated/warmelt-base.0.c: Regenerate. * melt/generated/warmelt-normatch.0.c: Regenerate. * melt/generated/warmelt-genobj.0+01.c: Regenerate. * melt/generated/warmelt-genobj.0+03.c: Regenerate. * melt/generated/warmelt-genobj.0+04.c: Regenerate. * melt/generated/warmelt-debug.0.c: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@167327 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi')
-rw-r--r--libffi/ChangeLog7
-rw-r--r--libffi/src/x86/sysv.S51
2 files changed, 33 insertions, 25 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index b5f87d396ae..6b78da8b053 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,10 @@
+2010-11-29 Richard Henderson <rth@redhat.com>
+ Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * src/x86/sysv.S (FDE_ENCODING, FDE_ENCODE): Define.
+ (.eh_frame): Use FDE_ENCODING.
+ (.LASFDE1, .LASFDE2, LASFDE3): Simplify with FDE_ENCODE.
+
2010-11-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* testsuite/lib/libffi-dg.exp: Rename ...
diff --git a/libffi/src/x86/sysv.S b/libffi/src/x86/sysv.S
index f3b0bd5ac52..f108dd80d71 100644
--- a/libffi/src/x86/sysv.S
+++ b/libffi/src/x86/sysv.S
@@ -328,6 +328,25 @@ ffi_closure_raw_SYSV:
.size ffi_closure_raw_SYSV, .-ffi_closure_raw_SYSV
#endif
+#if defined __PIC__
+# if defined __sun__ && defined __svr4__
+/* 32-bit Solaris 2/x86 uses datarel encoding for PIC. GNU ld before 2.22
+ doesn't correctly sort .eh_frame_hdr with mixed encodings, so match this. */
+# 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
+
.section .eh_frame,EH_FRAME_FLAGS,@progbits
.Lframe1:
.long .LECIE1-.LSCIE1 /* Length of Common Information Entry */
@@ -354,7 +373,7 @@ ffi_closure_raw_SYSV:
.byte 0x8 /* CIE RA Column */
#ifdef __PIC__
.byte 0x1 /* .uleb128 0x1; Augmentation size */
- .byte 0x1b /* FDE Encoding (pcrel sdata4) */
+ .byte FDE_ENCODING
#endif
.byte 0xc /* DW_CFA_def_cfa */
.byte 0x4 /* .uleb128 0x4 */
@@ -367,14 +386,8 @@ ffi_closure_raw_SYSV:
.long .LEFDE1-.LASFDE1 /* FDE Length */
.LASFDE1:
.long .LASFDE1-.Lframe1 /* FDE CIE offset */
-#if defined __PIC__ && defined HAVE_AS_X86_PCREL
- .long .LFB1-. /* FDE initial location */
-#elif defined __PIC__
- .long .LFB1@rel
-#else
- .long .LFB1
-#endif
- .long .LFE1-.LFB1 /* FDE address range */
+ .long FDE_ENCODE(.LFB1) /* FDE initial location */
+ .long .LFE1-.LFB1 /* FDE address range */
#ifdef __PIC__
.byte 0x0 /* .uleb128 0x0; Augmentation size */
#endif
@@ -394,14 +407,8 @@ ffi_closure_raw_SYSV:
.long .LEFDE2-.LASFDE2 /* FDE Length */
.LASFDE2:
.long .LASFDE2-.Lframe1 /* FDE CIE offset */
-#if defined __PIC__ && defined HAVE_AS_X86_PCREL
- .long .LFB2-. /* FDE initial location */
-#elif defined __PIC__
- .long .LFB2@rel
-#else
- .long .LFB2
-#endif
- .long .LFE2-.LFB2 /* FDE address range */
+ .long FDE_ENCODE(.LFB2) /* FDE initial location */
+ .long .LFE2-.LFB2 /* FDE address range */
#ifdef __PIC__
.byte 0x0 /* .uleb128 0x0; Augmentation size */
#endif
@@ -430,14 +437,8 @@ ffi_closure_raw_SYSV:
.long .LEFDE3-.LASFDE3 /* FDE Length */
.LASFDE3:
.long .LASFDE3-.Lframe1 /* FDE CIE offset */
-#if defined __PIC__ && defined HAVE_AS_X86_PCREL
- .long .LFB3-. /* FDE initial location */
-#elif defined __PIC__
- .long .LFB3@rel
-#else
- .long .LFB3
-#endif
- .long .LFE3-.LFB3 /* FDE address range */
+ .long FDE_ENCODE(.LFB3) /* FDE initial location */
+ .long .LFE3-.LFB3 /* FDE address range */
#ifdef __PIC__
.byte 0x0 /* .uleb128 0x0; Augmentation size */
#endif