using -z relo for arm-none-eabi

Nick Clifton nickc@redhat.com
Tue Apr 6 13:20:12 GMT 2021


Hi Norbert,

> Is there a way to activate this? AFAIU, relro is purely some modified
> layout so that should not be a problem, atlease if I feed the linker
> commonpagesize and maxpagesize?

You would have to define these values in the emulation parameters file
and then rebuild the linker,  but I think that in theory it should work.
This patch might do the trick, although I have not actually tested it
myself:

diff --git a/ld/emulparams/armelf.sh b/ld/emulparams/armelf.sh
index 1995c449975..5eba388fd81 100644
--- a/ld/emulparams/armelf.sh
+++ b/ld/emulparams/armelf.sh
@@ -41,3 +41,6 @@ NO_SMALL_DATA=yes
  # ARM supports the .noinit and .persistent sections.
  HAVE_NOINIT=yes
  HAVE_PERSISTENT=yes
+
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"

Cheers
   Nick



More information about the Binutils mailing list