!14 Add riscv64 support
From: @a-xiang-and-shanhaijing Reviewed-by: @jxy_git Signed-off-by: @jxy_git
This commit is contained in:
commit
c76aa44212
84
0002-add-riscv-support.patch
Normal file
84
0002-add-riscv-support.patch
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
diff -ur --new-file a/src/arch-riscv64.c b/src/arch-riscv64.c
|
||||||
|
--- a/src/arch-riscv64.c 1970-01-01 08:00:00.000000000 +0800
|
||||||
|
+++ b/src/arch-riscv64.c 2023-07-14 11:47:42.087234973 +0800
|
||||||
|
@@ -0,0 +1,38 @@
|
||||||
|
+/* Copyright (C) 2015 Red Hat, Inc.
|
||||||
|
+ Written by Mark Salter <msalter@redhat.com>, 2015.
|
||||||
|
+
|
||||||
|
+ 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
+
|
||||||
|
+#include <config.h>
|
||||||
|
+#include <assert.h>
|
||||||
|
+#include <errno.h>
|
||||||
|
+#include <fcntl.h>
|
||||||
|
+#include <stdio.h>
|
||||||
|
+#include <string.h>
|
||||||
|
+#include <locale.h>
|
||||||
|
+#include <error.h>
|
||||||
|
+#include <argp.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
+
|
||||||
|
+#include "prelink.h"
|
||||||
|
+
|
||||||
|
+PL_ARCH = {
|
||||||
|
+ .name = "riscv64",
|
||||||
|
+ .class = ELFCLASS64,
|
||||||
|
+ .machine = EM_RISCV,
|
||||||
|
+ .alternate_machine = { EM_NONE },
|
||||||
|
+ .max_page_size = 0x10000,
|
||||||
|
+ .page_size = 0x1000
|
||||||
|
+};
|
||||||
|
diff -ur --new-file a/src/Makefile.am b/src/Makefile.am
|
||||||
|
--- a/src/Makefile.am 2023-07-14 11:45:01.722930150 +0800
|
||||||
|
+++ b/src/Makefile.am 2023-07-14 11:46:04.135040698 +0800
|
||||||
|
@@ -13,7 +13,7 @@
|
||||||
|
arch_SOURCES = arch-i386.c arch-alpha.c arch-ppc.c arch-ppc64.c \
|
||||||
|
arch-sparc.c arch-sparc64.c arch-x86_64.c arch-mips.c \
|
||||||
|
arch-s390.c arch-s390x.c arch-arm.c arch-sh.c arch-ia64.c \
|
||||||
|
- arch-aarch64.c arch-loongarch64.c
|
||||||
|
+ arch-aarch64.c arch-loongarch64.c arch-riscv64.c
|
||||||
|
common_SOURCES = checksum.c data.c dso.c dwarf2.c dwarf2.h fptr.c fptr.h \
|
||||||
|
hashtab.c hashtab.h mdebug.c prelink.h stabs.c crc32.c
|
||||||
|
prelink_SOURCES = cache.c conflict.c cxx.c doit.c exec.c execle_open.c get.c \
|
||||||
|
diff -ur --new-file a/src/Makefile.in b/src/Makefile.in
|
||||||
|
--- a/src/Makefile.in 2023-07-14 11:45:01.722930150 +0800
|
||||||
|
+++ b/src/Makefile.in 2023-07-14 11:46:58.687147261 +0800
|
||||||
|
@@ -108,7 +108,7 @@
|
||||||
|
arch_SOURCES = arch-i386.c arch-alpha.c arch-ppc.c arch-ppc64.c \
|
||||||
|
arch-sparc.c arch-sparc64.c arch-x86_64.c arch-mips.c \
|
||||||
|
arch-s390.c arch-s390x.c arch-arm.c arch-sh.c arch-ia64.c \
|
||||||
|
- arch-aarch64.c arch-loongarch64.c
|
||||||
|
+ arch-aarch64.c arch-loongarch64.c arch-riscv64.c
|
||||||
|
|
||||||
|
common_SOURCES = checksum.c data.c dso.c dwarf2.c dwarf2.h fptr.c fptr.h \
|
||||||
|
hashtab.c hashtab.h mdebug.c prelink.h stabs.c crc32.c
|
||||||
|
@@ -141,7 +141,7 @@
|
||||||
|
arch-sparc64.$(OBJEXT) arch-x86_64.$(OBJEXT) \
|
||||||
|
arch-mips.$(OBJEXT) arch-s390.$(OBJEXT) arch-s390x.$(OBJEXT) \
|
||||||
|
arch-arm.$(OBJEXT) arch-sh.$(OBJEXT) arch-ia64.$(OBJEXT) \
|
||||||
|
- arch-aarch64.$(OBJEXT) arch-loongarch64.$(OBJEXT)
|
||||||
|
+ arch-aarch64.$(OBJEXT) arch-loongarch64.$(OBJEXT) arch-riscv64.$(OBJEXT)
|
||||||
|
am_execstack_OBJECTS = execstack.$(OBJEXT) $(am__objects_1) \
|
||||||
|
$(am__objects_2)
|
||||||
|
execstack_OBJECTS = $(am_execstack_OBJECTS)
|
||||||
|
@@ -164,7 +164,7 @@
|
||||||
|
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||||
|
am__depfiles_maybe = depfiles
|
||||||
|
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/arch-alpha.Po \
|
||||||
|
-@AMDEP_TRUE@ ./$(DEPDIR)/arch-arm.Po ./$(DEPDIR)/arch-aarch64.Po ./$(DEPDIR)/arch-i386.Po \
|
||||||
|
+@AMDEP_TRUE@ ./$(DEPDIR)/arch-arm.Po ./$(DEPDIR)/arch-aarch64.Po ./$(DEPDIR)/arch-i386.Po ./$(DEPDIR)/arch-riscv64.Po \
|
||||||
|
@AMDEP_TRUE@ ./$(DEPDIR)/arch-ia64.Po ./$(DEPDIR)/arch-mips.Po ./$(DEPDIR)/arch-loongarch64.Po \
|
||||||
|
@AMDEP_TRUE@ ./$(DEPDIR)/arch-ppc.Po ./$(DEPDIR)/arch-ppc64.Po \
|
||||||
|
@AMDEP_TRUE@ ./$(DEPDIR)/arch-s390.Po ./$(DEPDIR)/arch-s390x.Po \
|
||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: execstack
|
Name: execstack
|
||||||
Version: 0.5.0
|
Version: 0.5.0
|
||||||
Release: 19
|
Release: 20
|
||||||
Summary: Utility to set/clear/query executable stack bit
|
Summary: Utility to set/clear/query executable stack bit
|
||||||
URL: https://github.com/keszybz/prelink
|
URL: https://github.com/keszybz/prelink
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
@ -13,6 +13,7 @@ Source0: https://github.com/keszybz/prelink/archive/%{commit}.tar.gz#/pre
|
|||||||
Patch0: Add-PL_ARCH-for-AArch64.patch
|
Patch0: Add-PL_ARCH-for-AArch64.patch
|
||||||
Patch1: coverity.patch
|
Patch1: coverity.patch
|
||||||
Patch2: 0001-add-loongarch64-support.patch
|
Patch2: 0001-add-loongarch64-support.patch
|
||||||
|
Patch3: 0002-add-riscv-support.patch
|
||||||
|
|
||||||
BuildRequires: elfutils-libelf-devel
|
BuildRequires: elfutils-libelf-devel
|
||||||
BuildRequires: libselinux-devel, libselinux-utils
|
BuildRequires: libselinux-devel, libselinux-utils
|
||||||
@ -57,6 +58,9 @@ install -Dm0644 doc/execstack.8 %{buildroot}%{_mandir}/man8/execstack.8
|
|||||||
%{_mandir}/man8/execstack.8.*
|
%{_mandir}/man8/execstack.8.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jul 14 2023 zhangxiang <zhangxiang@iscas.ac.cn> - 0.5.0-20
|
||||||
|
- add riscv64 support
|
||||||
|
|
||||||
* Wed Feb 1 2023 doupengda <doupengda@loongson.cn> - 0.5.0-19
|
* Wed Feb 1 2023 doupengda <doupengda@loongson.cn> - 0.5.0-19
|
||||||
- add loongarch64 support
|
- add loongarch64 support
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user