[binutils-gdb] ld: Support RELRO in aarch64-elf target

Roland McGrath roland@sourceware.org
Wed Mar 26 03:34:46 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a393de33f2b3e8ddbf618ec84a0f9032f0efa859

commit a393de33f2b3e8ddbf618ec84a0f9032f0efa859
Author: Roland McGrath <mcgrathr@google.com>
Date:   Thu Mar 20 19:17:20 2025 -0700

    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.

Diff:
---
 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


More information about the Binutils-cvs mailing list