summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2010-03-15 19:36:26 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2010-03-15 19:36:26 +0000
commit5ed988d23c7fd71edc010e7b6d9fbbbee2dbf87e (patch)
treeb08b4948d80791b0d6ae7cf89ddff136424373b8
parentc29d64f7032233914e3f5e48ac690e3a96ba9acc (diff)
downloadgcc-5ed988d23c7fd71edc010e7b6d9fbbbee2dbf87e.tar.gz
* configure.ac (libffi_cv_as_x86_64_unwind_section_type): New test.
* configure: Regenerate. * fficonfig.h.in: Regenerate. * libffi/src/x86/unix64.S (.eh_frame) [HAVE_AS_X86_64_UNWIND_SECTION_TYPE]: Use @unwind section type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157466 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libffi/ChangeLog8
-rwxr-xr-xlibffi/configure23
-rw-r--r--libffi/configure.ac15
-rw-r--r--libffi/fficonfig.h.in3
-rw-r--r--libffi/src/x86/unix64.S4
5 files changed, 53 insertions, 0 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 85e255d1d27..200f5252d03 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,11 @@
+2010-03-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * configure.ac (libffi_cv_as_x86_64_unwind_section_type): New test.
+ * configure: Regenerate.
+ * fficonfig.h.in: Regenerate.
+ * libffi/src/x86/unix64.S (.eh_frame)
+ [HAVE_AS_X86_64_UNWIND_SECTION_TYPE]: Use @unwind section type.
+
2010-02-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* doc/libffi.texi (The Closure API): Fix typo.
diff --git a/libffi/configure b/libffi/configure
index 43fc0ec6e42..5555e51289d 100755
--- a/libffi/configure
+++ b/libffi/configure
@@ -12419,6 +12419,29 @@ $as_echo "#define FFI_MMAP_EXEC_WRIT 1" >>confdefs.h
;;
esac
+if test x$TARGET = xX86_64; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler supports unwind section type" >&5
+$as_echo_n "checking assembler supports unwind section type... " >&6; }
+if test "${libffi_cv_as_x86_64_unwind_section_type+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ libffi_cv_as_x86_64_unwind_section_type=yes
+ echo '.section .eh_frame,"a",@unwind' > conftest.s
+ if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
+ libffi_cv_as_x86_64_unwind_section_type=no
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libffi_cv_as_x86_64_unwind_section_type" >&5
+$as_echo "$libffi_cv_as_x86_64_unwind_section_type" >&6; }
+ if test "x$libffi_cv_as_x86_64_unwind_section_type" = xyes; then
+
+$as_echo "#define HAVE_AS_X86_64_UNWIND_SECTION_TYPE 1" >>confdefs.h
+
+ fi
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether .eh_frame section should be read-only" >&5
$as_echo_n "checking whether .eh_frame section should be read-only... " >&6; }
if test "${libffi_cv_ro_eh_frame+set}" = set; then :
diff --git a/libffi/configure.ac b/libffi/configure.ac
index c0e0da16507..1b484f94bde 100644
--- a/libffi/configure.ac
+++ b/libffi/configure.ac
@@ -284,6 +284,21 @@ case "$target" in
;;
esac
+if test x$TARGET = xX86_64; then
+ AC_CACHE_CHECK([assembler supports unwind section type],
+ libffi_cv_as_x86_64_unwind_section_type, [
+ libffi_cv_as_x86_64_unwind_section_type=yes
+ echo '.section .eh_frame,"a",@unwind' > conftest.s
+ if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
+ libffi_cv_as_x86_64_unwind_section_type=no
+ fi
+ ])
+ if test "x$libffi_cv_as_x86_64_unwind_section_type" = xyes; then
+ AC_DEFINE(HAVE_AS_X86_64_UNWIND_SECTION_TYPE, 1,
+ [Define if your assembler supports unwind section type.])
+ fi
+fi
+
AC_CACHE_CHECK([whether .eh_frame section should be read-only],
libffi_cv_ro_eh_frame, [
libffi_cv_ro_eh_frame=no
diff --git a/libffi/fficonfig.h.in b/libffi/fficonfig.h.in
index e03bbf90b27..7231cc5ead3 100644
--- a/libffi/fficonfig.h.in
+++ b/libffi/fficonfig.h.in
@@ -43,6 +43,9 @@
*/
#undef HAVE_AS_SPARC_UA_PCREL
+/* Define if your assembler supports unwind section type. */
+#undef HAVE_AS_X86_64_UNWIND_SECTION_TYPE
+
/* Define if your assembler supports PC relative relocs. */
#undef HAVE_AS_X86_PCREL
diff --git a/libffi/src/x86/unix64.S b/libffi/src/x86/unix64.S
index fe3f4fd6223..7a6619a5486 100644
--- a/libffi/src/x86/unix64.S
+++ b/libffi/src/x86/unix64.S
@@ -324,7 +324,11 @@ ffi_closure_unix64:
.LUW9:
.size ffi_closure_unix64,.-ffi_closure_unix64
+#ifdef HAVE_AS_X86_64_UNWIND_SECTION_TYPE
+ .section .eh_frame,"a",@unwind
+#else
.section .eh_frame,"a",@progbits
+#endif
.Lframe1:
.long .LECIE1-.LSCIE1 /* CIE Length */
.LSCIE1: