Version 3.0.8 with x86-solaris support
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 7026706..b63463e 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,17 @@
+2008-12-18 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ PR libffi/26048
+ * configure.ac (HAVE_AS_X86_PCREL): New test.
+ * configure: Regenerate.
+ * fficonfig.h.in: Regenerate.
+ * src/x86/sysv.S [!FFI_NO_RAW_API]: Precalculate
+ RAW_CLOSURE_CIF_OFFSET, RAW_CLOSURE_FUN_OFFSET,
+ RAW_CLOSURE_USER_DATA_OFFSET for the Solaris 10/x86 assembler.
+ (.eh_frame): Only use SYMBOL-. iff HAVE_AS_X86_PCREL.
+ * src/x86/unix64.S (.Lstore_table): Move to .text section.
+ (.Lload_table): Likewise.
+ (.eh_frame): Only use SYMBOL-. iff HAVE_AS_X86_PCREL.
+
2008-01-24 David Edelsohn <edelsohn@gnu.org>
* configure: Regenerate.
diff --git a/libffi/ChangeLog.libffi b/libffi/ChangeLog.libffi
index 7ba5118..cdc9115 100644
--- a/libffi/ChangeLog.libffi
+++ b/libffi/ChangeLog.libffi
@@ -1,3 +1,10 @@
+2008-12-19 Anthony Green <green@redhat.com>
+
+ * configure.ac: Bump version to 3.0.8.
+ * configure, doc/stamp-vti, doc/version.texi: Rebuilt.
+ * libtool-version: Increment revision.
+ * README: Update for new release.
+
2008-11-11 Anthony Green <green@redhat.com>
* configure.ac: Bump version to 3.0.7.
diff --git a/libffi/README b/libffi/README
index 36611b0..0d9c8fa 100644
--- a/libffi/README
+++ b/libffi/README
@@ -1,7 +1,7 @@
Status
======
-libffi-3.0.7 was released on November 11, 2008. Check the libffi web
+libffi-3.0.8 was released on December 19, 2008. Check the libffi web
page for updates: <URL:http://sourceware.org/libffi/>.
@@ -57,10 +57,12 @@ release was only tested on:
x86 freebsd
x86 linux
x86 openbsd
+ x86 solaris
x86-64 darwin
x86-64 linux
x86-64 OS X
x86-64 freebsd
+ x86-64 solaris
Please send additional platform test results to
libffi-discuss@sourceware.org.
diff --git a/libffi/configure b/libffi/configure
index d0ada88..a3280bc 100755
--- a/libffi/configure
+++ b/libffi/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for libffi 3.0.7.
+# Generated by GNU Autoconf 2.63 for libffi 3.0.8.
#
# Report bugs to <http://gcc.gnu.org/bugs.html>.
#
@@ -750,8 +750,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='libffi'
PACKAGE_TARNAME='libffi'
-PACKAGE_VERSION='3.0.7'
-PACKAGE_STRING='libffi 3.0.7'
+PACKAGE_VERSION='3.0.8'
+PACKAGE_STRING='libffi 3.0.8'
PACKAGE_BUGREPORT='http://gcc.gnu.org/bugs.html'
# Factoring default headers for most tests.
@@ -1550,7 +1550,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libffi 3.0.7 to adapt to many kinds of systems.
+\`configure' configures libffi 3.0.8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1621,7 +1621,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libffi 3.0.7:";;
+ short | recursive ) echo "Configuration of libffi 3.0.8:";;
esac
cat <<\_ACEOF
@@ -1734,7 +1734,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libffi configure 3.0.7
+libffi configure 3.0.8
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1748,7 +1748,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libffi $as_me 3.0.7, which was
+It was created by libffi $as_me 3.0.8, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2597,7 +2597,7 @@ fi
# Define the identity of the package.
PACKAGE='libffi'
- VERSION='3.0.7'
+ VERSION='3.0.8'
cat >>confdefs.h <<_ACEOF
@@ -23260,6 +23260,31 @@ _ACEOF
fi
fi
+if test x$TARGET = xX86 || test x$TARGET = xX86_64; then
+ { $as_echo "$as_me:$LINENO: checking assembler supports pc related relocs" >&5
+$as_echo_n "checking assembler supports pc related relocs... " >&6; }
+if test "${libffi_cv_as_x86_pcrel+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+
+ libffi_cv_as_x86_pcrel=yes
+ echo '.text; foo: nop; .data; .long foo-.; .text' > conftest.s
+ if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
+ libffi_cv_as_x86_pcrel=no
+ fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $libffi_cv_as_x86_pcrel" >&5
+$as_echo "$libffi_cv_as_x86_pcrel" >&6; }
+ if test "x$libffi_cv_as_x86_pcrel" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_AS_X86_PCREL 1
+_ACEOF
+
+ fi
+fi
+
{ $as_echo "$as_me:$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
@@ -24050,7 +24075,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libffi $as_me 3.0.7, which was
+This file was extended by libffi $as_me 3.0.8, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -24117,7 +24142,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-libffi config.status 3.0.7
+libffi config.status 3.0.8
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/libffi/configure.ac b/libffi/configure.ac
index e5ce63b..052a77b 100644
--- a/libffi/configure.ac
+++ b/libffi/configure.ac
@@ -2,7 +2,7 @@ dnl Process this with autoconf to create configure
AC_PREREQ(2.59)
-AC_INIT([libffi], [3.0.7], [http://gcc.gnu.org/bugs.html])
+AC_INIT([libffi], [3.0.8], [http://gcc.gnu.org/bugs.html])
AC_CONFIG_HEADERS([fficonfig.h])
AC_CANONICAL_SYSTEM
@@ -245,6 +245,21 @@ if test x$TARGET = xSPARC; then
fi
fi
+if test x$TARGET = xX86 || test x$TARGET = xX86_64; then
+ AC_CACHE_CHECK([assembler supports pc related relocs],
+ libffi_cv_as_x86_pcrel, [
+ libffi_cv_as_x86_pcrel=yes
+ echo '.text; foo: nop; .data; .long foo-.; .text' > conftest.s
+ if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
+ libffi_cv_as_x86_pcrel=no
+ fi
+ ])
+ if test "x$libffi_cv_as_x86_pcrel" = xyes; then
+ AC_DEFINE(HAVE_AS_X86_PCREL, 1,
+ [Define if your assembler supports PC relative relocs.])
+ 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/doc/stamp-vti b/libffi/doc/stamp-vti
index f04e3db..81d0b79 100644
--- a/libffi/doc/stamp-vti
+++ b/libffi/doc/stamp-vti
@@ -1,4 +1,4 @@
@set UPDATED 14 February 2008
@set UPDATED-MONTH February 2008
-@set EDITION 3.0.7
-@set VERSION 3.0.7
+@set EDITION 3.0.8
+@set VERSION 3.0.8
diff --git a/libffi/doc/version.texi b/libffi/doc/version.texi
index f04e3db..81d0b79 100644
--- a/libffi/doc/version.texi
+++ b/libffi/doc/version.texi
@@ -1,4 +1,4 @@
@set UPDATED 14 February 2008
@set UPDATED-MONTH February 2008
-@set EDITION 3.0.7
-@set VERSION 3.0.7
+@set EDITION 3.0.8
+@set VERSION 3.0.8
diff --git a/libffi/fficonfig.h.in b/libffi/fficonfig.h.in
index 07fa537..32ae5eb 100644
--- a/libffi/fficonfig.h.in
+++ b/libffi/fficonfig.h.in
@@ -37,6 +37,9 @@
*/
#undef HAVE_AS_SPARC_UA_PCREL
+/* Define if your assembler supports PC relative relocs. */
+#undef HAVE_AS_X86_PCREL
+
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
diff --git a/libffi/libtool-version b/libffi/libtool-version
index faa2f61..bf2988a 100644
--- a/libffi/libtool-version
+++ b/libffi/libtool-version
@@ -26,4 +26,4 @@
# release, then set age to 0.
#
# CURRENT:REVISION:AGE
-5:8:0
+5:9:0
diff --git a/libffi/src/x86/sysv.S b/libffi/src/x86/sysv.S
index 2711fde..f4b6c1e 100644
--- a/libffi/src/x86/sysv.S
+++ b/libffi/src/x86/sysv.S
@@ -242,9 +242,20 @@ ffi_closure_SYSV:
#if !FFI_NO_RAW_API
+/* Precalculate for e.g. the Solaris 10/x86 assembler. */
+#if FFI_TRAMPOLINE_SIZE == 10
+#define RAW_CLOSURE_CIF_OFFSET 12
+#define RAW_CLOSURE_FUN_OFFSET 16
+#define RAW_CLOSURE_USER_DATA_OFFSET 20
+#elif FFI_TRAMPOLINE_SIZE == 24
+#define RAW_CLOSURE_CIF_OFFSET 24
+#define RAW_CLOSURE_FUN_OFFSET 28
+#define RAW_CLOSURE_USER_DATA_OFFSET 32
+#else
#define RAW_CLOSURE_CIF_OFFSET ((FFI_TRAMPOLINE_SIZE + 3) & ~3)
#define RAW_CLOSURE_FUN_OFFSET (RAW_CLOSURE_CIF_OFFSET + 4)
#define RAW_CLOSURE_USER_DATA_OFFSET (RAW_CLOSURE_FUN_OFFSET + 4)
+#endif
#define CIF_FLAGS_OFFSET 20
.align 4
@@ -343,10 +354,12 @@ ffi_closure_raw_SYSV:
.long .LEFDE1-.LASFDE1 /* FDE Length */
.LASFDE1:
.long .LASFDE1-.Lframe1 /* FDE CIE offset */
-#ifdef __PIC__
+#if defined __PIC__ && defined HAVE_AS_X86_PCREL
.long .LFB1-. /* FDE initial location */
+#elif defined __PIC__
+ .long .LFB1@rel
#else
- .long .LFB1 /* FDE initial location */
+ .long .LFB1
#endif
.long .LFE1-.LFB1 /* FDE address range */
#ifdef __PIC__
@@ -368,8 +381,10 @@ ffi_closure_raw_SYSV:
.long .LEFDE2-.LASFDE2 /* FDE Length */
.LASFDE2:
.long .LASFDE2-.Lframe1 /* FDE CIE offset */
-#ifdef __PIC__
+#if defined __PIC__ && defined HAVE_AS_X86_PCREL
.long .LFB2-. /* FDE initial location */
+#elif defined __PIC__
+ .long .LFB2@rel
#else
.long .LFB2
#endif
@@ -402,8 +417,10 @@ ffi_closure_raw_SYSV:
.long .LEFDE3-.LASFDE3 /* FDE Length */
.LASFDE3:
.long .LASFDE3-.Lframe1 /* FDE CIE offset */
-#ifdef __PIC__
+#if defined __PIC__ && defined HAVE_AS_X86_PCREL
.long .LFB3-. /* FDE initial location */
+#elif defined __PIC__
+ .long .LFB3@rel
#else
.long .LFB3
#endif
diff --git a/libffi/src/x86/unix64.S b/libffi/src/x86/unix64.S
index 046564d..fe3f4fd 100644
--- a/libffi/src/x86/unix64.S
+++ b/libffi/src/x86/unix64.S
@@ -89,7 +89,6 @@ ffi_call_unix64:
addq %r11, %r10
jmp *%r10
- .section .rodata
.Lstore_table:
.long .Lst_void-.Lstore_table /* FFI_TYPE_VOID */
.long .Lst_sint32-.Lstore_table /* FFI_TYPE_INT */
@@ -107,7 +106,6 @@ ffi_call_unix64:
.long .Lst_struct-.Lstore_table /* FFI_TYPE_STRUCT */
.long .Lst_int64-.Lstore_table /* FFI_TYPE_POINTER */
- .text
.align 2
.Lst_void:
ret
@@ -240,7 +238,6 @@ ffi_closure_unix64:
addq %r11, %r10
jmp *%r10
- .section .rodata
.Lload_table:
.long .Lld_void-.Lload_table /* FFI_TYPE_VOID */
.long .Lld_int32-.Lload_table /* FFI_TYPE_INT */
@@ -258,7 +255,6 @@ ffi_closure_unix64:
.long .Lld_struct-.Lload_table /* FFI_TYPE_STRUCT */
.long .Lld_int64-.Lload_table /* FFI_TYPE_POINTER */
- .text
.align 2
.Lld_void:
ret
@@ -351,7 +347,11 @@ ffi_closure_unix64:
.long .LEFDE1-.LASFDE1 /* FDE Length */
.LASFDE1:
.long .LASFDE1-.Lframe1 /* FDE CIE offset */
+#if HAVE_AS_X86_PCREL
.long .LUW0-. /* FDE initial location */
+#else
+ .long .LUW0@rel
+#endif
.long .LUW4-.LUW0 /* FDE address range */
.uleb128 0x0 /* Augmentation size */
@@ -389,7 +389,11 @@ ffi_closure_unix64:
.long .LEFDE3-.LASFDE3 /* FDE Length */
.LASFDE3:
.long .LASFDE3-.Lframe1 /* FDE CIE offset */
+#if HAVE_AS_X86_PCREL
.long .LUW5-. /* FDE initial location */
+#else
+ .long .LUW5@rel
+#endif
.long .LUW9-.LUW5 /* FDE address range */
.uleb128 0x0 /* Augmentation size */