SHA256
8
0
forked from pool/libffi

4 Commits

5 changed files with 93 additions and 5 deletions

36
943.patch Normal file
View File

@@ -0,0 +1,36 @@
From 50a7de2cb7c4a7f272f7ce7f8f00c7e06550a8c5 Mon Sep 17 00:00:00 2001
From: Guillaume Gardet <guillaume.gardet@arm.com>
Date: Thu, 23 Oct 2025 17:27:18 +0200
Subject: [PATCH] aarch64: support GCS in assembly
Signed-off-by: Guillaume Gardet <guillaume.gardet@arm.com>
---
src/aarch64/sysv.S | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/aarch64/sysv.S b/src/aarch64/sysv.S
index 81d33f2ef..ab85ddd46 100644
--- a/src/aarch64/sysv.S
+++ b/src/aarch64/sysv.S
@@ -74,6 +74,12 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
.text
.align 4
+#if defined(__ARM_FEATURE_GCS_DEFAULT) && __ARM_FEATURE_GCS_DEFAULT == 1
+#define GNU_PROPERTY_AARCH64_GCS (1<<2)
+#else
+#define GNU_PROPERTY_AARCH64_GCS 0 /* No GCS */
+#endif
+
/* ffi_call_SYSV
extern void ffi_call_SYSV (void *stack, void *frame,
void (*fn)(void), void *rvalue,
@@ -692,7 +698,7 @@ CNAME(ffi_go_closure_SYSV):
.asciz "GNU";
.long 0xc0000000; /* GNU_PROPERTY_AARCH64_FEATURE_1_AND */
.long 4;
- .long GNU_PROPERTY_AARCH64_BTI | GNU_PROPERTY_AARCH64_POINTER_AUTH;
+ .long GNU_PROPERTY_AARCH64_BTI | GNU_PROPERTY_AARCH64_POINTER_AUTH | GNU_PROPERTY_AARCH64_GCS;
.long 0;
.popsection;
#endif

Binary file not shown.

BIN
libffi-3.5.2.tar.gz LFS Normal file

Binary file not shown.

View File

@@ -1,3 +1,50 @@
-------------------------------------------------------------------
Sun Oct 26 09:18:40 UTC 2025 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Add upstream patch to fix GCS on aarch64:
* 943.patch
-------------------------------------------------------------------
Thu Sep 4 07:14:03 UTC 2025 - Fridrich Strba <fstrba@suse.com>
- Update to 3.5.2
* Changes
+ fix: enable FFI_MMAP_EXEC_WRIT for DragonFly BSD
+ Emscripten: Add wasm64 target
+ fix: Ensure trampoline file descriptors are closed on exec.
-------------------------------------------------------------------
Thu Sep 4 07:12:20 UTC 2025 - Fridrich Strba <fstrba@suse.com>
- Update to 3.5.1
* Changes
+ Downgrade Autoconf requirement to version 2.68
+ Fix symbol versioning error.
-------------------------------------------------------------------
Thu Sep 4 07:10:42 UTC 2025 - Fridrich Strba <fstrba@suse.com>
- Update to 3.5.0
* Changes
+ Add FFI_VERSION_STRING and FFI_VERSION_NUMBER macros, as well
as ffi_get_version() and ffi_get_version_number() functions.
+ Add ffi_get_default_abi() and ffi_get_closure_size() functions.
+ Fix closures on powerpc64-linux when statically linking.
+ Mark the PA stack as non-executable.
-------------------------------------------------------------------
Wed Sep 3 11:40:13 UTC 2025 - Fridrich Strba <fstrba@suse.com>
- Update to 3.4.8
* Changes
+ aarch64: add PAC to GNU Notes
+ MIPS: Dont import asm/sgidefs.h on linux
+ Update the Simple Example from the Docs to fix a compile error
+ Fix bugs in the x86-64 and x32 target (#887)
+ Add the "ABI_ATTR" attribute to called functions (#891)
+ powerpc: Add static trampoline support (#894)
+ testsuite: add two tests to Makefile.am
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Mar 19 17:40:33 UTC 2025 - Richard Biener <rguenther@suse.com> Wed Mar 19 17:40:33 UTC 2025 - Richard Biener <rguenther@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package libffi # spec file for package libffi
# #
# Copyright (c) 2025 SUSE LLC # Copyright (c) 2025 SUSE LLC and contributors
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -16,9 +16,12 @@
# #
%ifarch %ix86
%define _lto_cflags %{nil}
%endif
%define libffi_sover 8 %define libffi_sover 8
Name: libffi Name: libffi
Version: 3.4.7 Version: 3.5.2
Release: 0 Release: 0
Summary: Foreign Function Interface Library Summary: Foreign Function Interface Library
License: MIT License: MIT
@@ -26,6 +29,8 @@ Group: Development/Languages/C and C++
URL: https://sourceware.org/libffi/ URL: https://sourceware.org/libffi/
Source: https://github.com/libffi/libffi/releases/download/v%{version}/libffi-%{version}.tar.gz Source: https://github.com/libffi/libffi/releases/download/v%{version}/libffi-%{version}.tar.gz
Source99: baselibs.conf Source99: baselibs.conf
# PATCH-FIX-UPSTREAM - https://github.com/libffi/libffi/pull/943
Patch0: 943.patch
# for make check # for make check
BuildRequires: dejagnu BuildRequires: dejagnu
BuildRequires: expect BuildRequires: expect