File riscv64-support-for-execstack.patch of Package execstack
Index: prelink-4c79120bcdbde0616f592458ccde7035e92ca3d8/src/Makefile.am
===================================================================
--- prelink-4c79120bcdbde0616f592458ccde7035e92ca3d8.orig/src/Makefile.am
+++ prelink-4c79120bcdbde0616f592458ccde7035e92ca3d8/src/Makefile.am
@@ -13,7 +13,7 @@ bin_PROGRAMS = execstack
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-aarch64.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 \
Index: prelink-4c79120bcdbde0616f592458ccde7035e92ca3d8/src/Makefile.in
===================================================================
--- prelink-4c79120bcdbde0616f592458ccde7035e92ca3d8.orig/src/Makefile.in
+++ prelink-4c79120bcdbde0616f592458ccde7035e92ca3d8/src/Makefile.in
@@ -108,7 +108,7 @@ bin_PROGRAMS = execstack
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-aarch64.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 @@ am__objects_2 = arch-i386.$(OBJEXT) arch
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-aarch64.$(OBJEXT) arch-riscv64.$(OBJEXT)
am_execstack_OBJECTS = execstack.$(OBJEXT) $(am__objects_1) \
$(am__objects_2)
execstack_OBJECTS = $(am_execstack_OBJECTS)
@@ -167,6 +167,7 @@ am__depfiles_maybe = depfiles
@AMDEP_TRUE@ ./$(DEPDIR)/arch-arm.Po ./$(DEPDIR)/arch-aarch64.Po ./$(DEPDIR)/arch-i386.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/arch-ia64.Po ./$(DEPDIR)/arch-mips.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/arch-ppc.Po ./$(DEPDIR)/arch-ppc64.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/arch-riscv64.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/arch-s390.Po ./$(DEPDIR)/arch-s390x.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/arch-sh.Po ./$(DEPDIR)/arch-sparc.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/arch-sparc64.Po \
@@ -285,6 +286,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-mips.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-ppc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-ppc64.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-riscv64.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-s390.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-s390x.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arch-sh.Po@am__quote@
Index: prelink-4c79120bcdbde0616f592458ccde7035e92ca3d8/src/arch-riscv64.c
===================================================================
--- /dev/null
+++ prelink-4c79120bcdbde0616f592458ccde7035e92ca3d8/src/arch-riscv64.c
@@ -0,0 +1,12 @@
+#include <config.h>
+
+#include "prelink.h"
+
+PL_ARCH = {
+ .name = "RISCV64",
+ .class = ELFCLASS64,
+ .machine = EM_RISCV,
+ .alternate_machine = { EM_NONE },
+ .max_page_size = 0x1000,
+ .page_size = 0x1000
+};