summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliuzhensong <liuzhensong@loongson.cn>2022-07-25 10:22:27 +0800
committerliuzhensong <liuzhensong@loongson.cn>2022-08-01 09:05:00 +0800
commit48ca1b26b99c8fd5bc21f5c69b6b666d9b6b9726 (patch)
tree54dde18382830b5ed2d58bac1b771ff721bd0e16
parent9ea6fffe1ebec9bd1929c708e044b765eabea258 (diff)
LoongArch: Set defaults to exec stack 0.
-rw-r--r--bfd/elfnn-loongarch.c1
-rw-r--r--ld/testsuite/ld-elf/elf.exp1
2 files changed, 2 insertions, 0 deletions
diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c
index 99d889ae11..8d0f66ea7c 100644
--- a/bfd/elfnn-loongarch.c
+++ b/bfd/elfnn-loongarch.c
@@ -132,6 +132,7 @@ struct loongarch_elf_link_hash_table
#define elf_backend_want_dynrelro 1
#define elf_backend_rela_normal 1
+#define elf_backend_default_execstack 0
/* Generate a PLT header. */
diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp
index 10c635e959..64b1d34f05 100644
--- a/ld/testsuite/ld-elf/elf.exp
+++ b/ld/testsuite/ld-elf/elf.exp
@@ -184,6 +184,7 @@ proc target_defaults_to_execstack {} {
|| [istarget "arc*-*-*"]
|| [istarget "cris*-*-*"]
|| [istarget "ia64*-*-*"]
+ || [istarget "loongarch*-*-*"]
|| [istarget "nios2*-*-*"]
|| [istarget "powerpc64*-*-*"]
|| [istarget "riscv*-*-*"]