From fe5ad417a7e79d1a20c897c58a46529467c43d0b Mon Sep 17 00:00:00 2001 From: Anthony Green Date: Sun, 29 Jun 2014 23:48:46 -0400 Subject: [PATCH] PR1110966. Fix exec stack bug. --- libffi-3.1-fix-exec-stack.patch | 31 +++++++++++++++++++++++++++++++ libffi.spec | 7 ++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 libffi-3.1-fix-exec-stack.patch diff --git a/libffi-3.1-fix-exec-stack.patch b/libffi-3.1-fix-exec-stack.patch new file mode 100644 index 0000000..4c2a59f --- /dev/null +++ b/libffi-3.1-fix-exec-stack.patch @@ -0,0 +1,31 @@ +From 978c9540154d320525488db1b7049277122f736d Mon Sep 17 00:00:00 2001 +From: Samuli Suominen +Date: Sat, 31 May 2014 08:53:10 -0400 +Subject: [PATCH] Add missing GNU stack markings in win32.S + +--- + src/x86/win32.S | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/x86/win32.S b/src/x86/win32.S +index daf0e79..e42baf2 100644 +--- a/src/x86/win32.S ++++ b/src/x86/win32.S +@@ -1,5 +1,6 @@ + /* ----------------------------------------------------------------------- +- win32.S - Copyright (c) 1996, 1998, 2001, 2002, 2009 Red Hat, Inc. ++ win32.S - Copyright (c) 2014 Anthony Green ++ Copyright (c) 1996, 1998, 2001, 2002, 2009 Red Hat, Inc. + Copyright (c) 2001 John Beniton + Copyright (c) 2002 Ranjit Mathew + Copyright (c) 2009 Daniel Witte +@@ -1304,3 +1305,6 @@ L_ffi_closure_SYSV_inner$stub: + + #endif /* !_MSC_VER */ + ++#if defined __ELF__ && defined __linux__ ++ .section .note.GNU-stack,"",@progbits ++#endif +-- +1.9.3 + diff --git a/libffi.spec b/libffi.spec index e9038a1..fa91abe 100644 --- a/libffi.spec +++ b/libffi.spec @@ -2,7 +2,7 @@ Name: libffi Version: 3.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A portable foreign function interface library Group: System Environment/Libraries @@ -12,6 +12,7 @@ Source0: ftp://sourceware.org/pub/libffi/libffi-%{version}.tar.gz Source1: ffi-multilib.h Source2: ffitarget-multilib.h Patch0: libffi-3.1-fix-include-path.patch +Patch1: libffi-3.1-fix-exec-stack.patch %description Compilers for high level languages generate code that follow certain @@ -57,6 +58,7 @@ developing applications that use %{name}. %prep %setup -q %patch0 -p1 -b .fixpath +%patch1 -p1 -b .execstack %build @@ -116,6 +118,9 @@ fi %{_infodir}/libffi.info.gz %changelog +* Sun Jun 29 2014 Anthony Green - 3.1-4 +- fix exec stack problem on 32-bit build + * Thu Jun 12 2014 Dan HorĂ¡k - 3.1-3 - fix header path in pkgconfig file