File libhugetlbfs-noexecstack.patch of Package libhugetlbfs.31456

diff --git a/Makefile b/Makefile
index 2375ec1..7ce8161 100644
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,7 @@ NODEPTARGETS=<version.h> <clean>
 
 INSTALL = install
 
-LDFLAGS += -Wl,-z,noexecstack -ldl
+LDFLAGS += -ldl
 CFLAGS ?= -O2 -g
 CFLAGS += -Wall -fPIC
 CPPFLAGS += -D__LIBHUGETLBFS__
diff --git a/sys-aarch64elf.S b/sys-aarch64elf.S
index 54799d3..210558b 100644
--- a/sys-aarch64elf.S
+++ b/sys-aarch64elf.S
@@ -32,3 +32,7 @@ direct_syscall:
 	mov	x6, x7
 	svc	0x0
 	ret
+
+#if defined(__linux__) && defined(__ELF__)
+	.section .note.GNU-stack,"",%progbits
+#endif
diff --git a/sys-armelf_linux_eabi.S b/sys-armelf_linux_eabi.S
index dfa7407..265b75d 100644
--- a/sys-armelf_linux_eabi.S
+++ b/sys-armelf_linux_eabi.S
@@ -31,3 +31,7 @@ direct_syscall:
 	swi     0x0
 	ldmfd   sp!, {r4, r5, r6, r7}
 	bx	lr
+
+#if defined(__linux__) && defined(__ELF__)
+	.section .note.GNU-stack,"",%progbits
+#endif
diff --git a/sys-elf32ppclinux.S b/sys-elf32ppclinux.S
index 65d8b3f..6ba3f22 100644
--- a/sys-elf32ppclinux.S
+++ b/sys-elf32ppclinux.S
@@ -32,3 +32,7 @@ direct_syscall:
 	mr	8,9
 	sc
 	blr
+
+#if defined(__linux__) && defined(__ELF__)
+	.section .note.GNU-stack,"",%progbits
+#endif
diff --git a/sys-elf64_s390.S b/sys-elf64_s390.S
index 425a387..5c31899 100644
--- a/sys-elf64_s390.S
+++ b/sys-elf64_s390.S
@@ -20,3 +20,7 @@ direct_syscall:
 	lgr	%r5,%r6
 	svc	0
 	br	%r14
+
+#if defined(__linux__) && defined(__ELF__)
+	.section .note.GNU-stack,"",%progbits
+#endif
diff --git a/sys-elf64ppc.S b/sys-elf64ppc.S
index d50f4a6..b57a345 100644
--- a/sys-elf64ppc.S
+++ b/sys-elf64ppc.S
@@ -46,3 +46,7 @@ direct_syscall:
 	mr	8,9
 	sc
 	blr
+
+#if defined(__linux__) && defined(__ELF__)
+	.section .note.GNU-stack,"",%progbits
+#endif
diff --git a/sys-elf_i386.S b/sys-elf_i386.S
index ab30c8d..6182b3d 100644
--- a/sys-elf_i386.S
+++ b/sys-elf_i386.S
@@ -40,3 +40,7 @@ direct_syscall:
 	pop	%edi
 	pop	%ebp
 	ret
+
+#if defined(__linux__) && defined(__ELF__)
+	.section .note.GNU-stack,"",%progbits
+#endif
diff --git a/sys-elf_s390.S b/sys-elf_s390.S
index 40630d1..e6a9a96 100644
--- a/sys-elf_s390.S
+++ b/sys-elf_s390.S
@@ -20,3 +20,7 @@ direct_syscall:
 	lr	%r5,%r6
 	svc	0
 	br	%r14
+
+#if defined(__linux__) && defined(__ELF__)
+	.section .note.GNU-stack,"",%progbits
+#endif
diff --git a/sys-elf_x86_64.S b/sys-elf_x86_64.S
index 6af06ad..561f49b 100644
--- a/sys-elf_x86_64.S
+++ b/sys-elf_x86_64.S
@@ -32,3 +32,7 @@ direct_syscall:
 	mov	0x8(%rsp),%r9
 	syscall
 	retq
+
+#if defined(__linux__) && defined(__ELF__)
+	.section .note.GNU-stack,"",%progbits
+#endif
openSUSE Build Service is sponsored by