PR1110966. Fix exec stack bug.

This commit is contained in:
Anthony Green 2014-06-29 23:48:46 -04:00
parent f8dded0eab
commit fe5ad417a7
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,31 @@
From 978c9540154d320525488db1b7049277122f736d Mon Sep 17 00:00:00 2001
From: Samuli Suominen <ssuominen@gentoo.org>
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

View File

@ -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 <green@redhat.com> - 3.1-4
- fix exec stack problem on 32-bit build
* Thu Jun 12 2014 Dan Horák <dan[at]danny.cz> - 3.1-3
- fix header path in pkgconfig file