From 0bafa89eba0af93f1bcf31a36d99bdfd21e1dbcc Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 20 Mar 2025 19:17:20 -0700 Subject: [PATCH] ld: Support RELRO in aarch64-elf target Other *-elf targets set COMMONPAGESIZE in emulparams/*.sh and so enable `-z relro` and related features. Make aarch64-elf match. There is no reason to think that a "generic ELF" target should have any particular set of features disabled. --- ld/emulparams/aarch64elf.sh | 1 + ld/emulparams/aarch64elf32.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/ld/emulparams/aarch64elf.sh b/ld/emulparams/aarch64elf.sh index 72616b57691..aa051c76a7a 100644 --- a/ld/emulparams/aarch64elf.sh +++ b/ld/emulparams/aarch64elf.sh @@ -18,6 +18,7 @@ GENERATE_SHLIB_SCRIPT=yes GENERATE_PIE_SCRIPT=yes MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" ENTRY=_start EMBEDDED=yes diff --git a/ld/emulparams/aarch64elf32.sh b/ld/emulparams/aarch64elf32.sh index 45bf31a179a..0565b7a066c 100644 --- a/ld/emulparams/aarch64elf32.sh +++ b/ld/emulparams/aarch64elf32.sh @@ -18,6 +18,7 @@ GENERATE_SHLIB_SCRIPT=yes GENERATE_PIE_SCRIPT=yes MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" +COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" ENTRY=_start EMBEDDED=yes -- 2.47.2