diff --git a/0001-libsigsegv-add-sw.patch b/0001-libsigsegv-add-sw.patch new file mode 100644 index 0000000000000000000000000000000000000000..d519956a69ff1b3ae1a04b1e344f8ef722989158 --- /dev/null +++ b/0001-libsigsegv-add-sw.patch @@ -0,0 +1,122 @@ +From 8c8e95bafd41d942efcf2e8208d2235f6f5465d7 Mon Sep 17 00:00:00 2001 +From: wxiat +Date: Mon, 26 Jun 2023 15:04:32 +0800 +Subject: [PATCH] add sw + +Signed-off-by: wxiat +--- + configure | 8 ++++++++ + src/fault-linux-sw_64-old.h | 22 ++++++++++++++++++++++ + src/fault-linux-sw_64.h | 28 ++++++++++++++++++++++++++++ + src/fault-osf.h | 1 + + 7 files changed, 62 insertions(+) + create mode 100644 src/fault-linux-sw_64-old.h + create mode 100644 src/fault-linux-sw_64.h + +diff --git a/configure b/configure +index 0a6b0b6..602ef70 100755 +--- a/configure ++++ b/configure +@@ -15071,6 +15071,9 @@ done + alpha*) + CFG_FAULT=fault-linux-alpha.h + ;; ++ sw_64*) ++ CFG_FAULT=fault-linux-sw_64.h ++ ;; + arm* | strongarm* | xscale* | aarch64*) + CFG_FAULT=fault-linux-arm.h + ;; +@@ -15234,6 +15237,10 @@ else + CFG_FAULT=fault-linux-alpha-old.h + FAULT_CONTEXT='struct sigcontext' + ;; ++ sw_64*) ++ CFG_FAULT=fault-linux-sw_64-old.h ++ FAULT_CONTEXT='struct sigcontext' ++ ;; + arm* | strongarm* | xscale*) + CFG_FAULT=fault-linux-arm-old.h + FAULT_CONTEXT='struct sigcontext' +@@ -15340,6 +15347,7 @@ else + a29k | \ + aarch64* | \ + alpha* | \ ++ sw_64* | \ + arc | \ + arm* | strongarm* | xscale* | \ + avr | avr32 | \ +diff --git a/src/fault-linux-sw_64-old.h b/src/fault-linux-sw_64-old.h +new file mode 100644 +index 0000000..0b49da0 +--- /dev/null ++++ b/src/fault-linux-sw_64-old.h +@@ -0,0 +1,22 @@ ++/* Fault handler information. Linux/Alpha version. ++ Copyright (C) 2002 Bruno Haible ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2, or (at your option) ++ any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software Foundation, ++ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ ++ ++#include ++ ++#define SIGSEGV_FAULT_HANDLER_ARGLIST int sig, int code, struct sigcontext *scp ++#define SIGSEGV_FAULT_CONTEXT scp ++#define SIGSEGV_FAULT_STACKPOINTER scp->sc_regs[30] +diff --git a/src/fault-linux-sw_64.h b/src/fault-linux-sw_64.h +new file mode 100644 +index 0000000..84b369e +--- /dev/null ++++ b/src/fault-linux-sw_64.h +@@ -0,0 +1,28 @@ ++/* Fault handler information. Linux/Sw_64 version when it supports POSIX. ++ Copyright (C) 2002, 2009 Bruno Haible ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2, or (at your option) ++ any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software Foundation, ++ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ ++ ++#include "fault-posix-ucontext.h" ++ ++/* See glibc/sysdeps/unix/sysv/linux/sw_64/sys/ucontext.h ++ and the definition of GET_STACK in ++ glibc/sysdeps/unix/sysv/linux/sw_64/sigcontextinfo.h. ++ Note that the 'mcontext_t' defined in ++ glibc/sysdeps/unix/sysv/linux/sw_64/sys/ucontext.h ++ and the 'struct sigcontext' defined in ++ are actually the same. */ ++ ++#define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.sc_regs[30] +diff --git a/src/fault-osf.h b/src/fault-osf.h +index 8b93957..b141686 100644 +--- a/src/fault-osf.h ++++ b/src/fault-osf.h +@@ -17,3 +17,4 @@ + + #define SIGSEGV_FAULT_HANDLER_ARGLIST int sig, int code, struct sigcontext *scp + #define SIGSEGV_FAULT_CONTEXT scp ++#define SIGSEGV_FAULT_ADDRESS scp->sc_traparg_a0 +-- +2.31.1 + diff --git a/libsigsegv.spec b/libsigsegv.spec index f64357893093dec70ac160e603de6eb4037cb982..250c361923b5ab5eddd86072445014738d0153cf 100644 --- a/libsigsegv.spec +++ b/libsigsegv.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.1 +%define anolis_release .0.2 Summary: Library for handling page faults in user mode @@ -10,6 +10,8 @@ License: GPLv2+ URL: https://www.gnu.org/software/libsigsegv/ Source0: http://ftp.gnu.org/gnu/libsigsegv/libsigsegv-%{version}.tar.gz +Patch0: 0001-libsigsegv-add-sw.patch + BuildRequires: automake libtool %description @@ -46,6 +48,7 @@ Doc pages for %{name}. %prep %setup -q +%patch0 -p1 %build @@ -99,6 +102,9 @@ make check %doc AUTHORS NEWS README %changelog +* Mon Jun 26 2023 wxiat - 2.11-5.0.2 +- add sw patch + * Tue Jul 19 2022 DengXiewei - 2.11-5.0.1 - Add doc sub package