gnu-efi/backport-0003-add-non-executable-GNU-stack-marking-on-ELF-linux.patch

23 lines
690 B
Diff

From 98f7e9bd21bced75dd10f08766a2fc162ffb0838 Mon Sep 17 00:00:00 2001
From: Xiaotian Wu <wuxiaotian@loongson.cn>
Date: Sat, 26 Aug 2023 11:05:58 +0800
Subject: [PATCH 3/3] add non-executable GNU stack marking on ELF-linux
Signed-off-by: Xiaotian Wu <wuxiaotian@loongson.cn>
---
lib/loongarch64/efi_stub.S | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/loongarch64/efi_stub.S b/lib/loongarch64/efi_stub.S
index 464eae5..b3fba1d 100644
--- a/lib/loongarch64/efi_stub.S
+++ b/lib/loongarch64/efi_stub.S
@@ -1 +1,4 @@
/* This stub is a stub to make the build happy */
+#if defined(__ELF__) && defined(__linux__)
+ .section .note.GNU-stack,"",%progbits
+#endif
--
2.43.0