diff --git a/repos/base/mk/spec/arm.mk b/repos/base/mk/spec/arm.mk index 713985ec16f..17442db08c5 100644 --- a/repos/base/mk/spec/arm.mk +++ b/repos/base/mk/spec/arm.mk @@ -11,4 +11,12 @@ SPECS += 32bit # CC_OPT += -Wno-psabi +# +# By default, the linker produces ELF binaries where the test segment is +# aligned to the largest page size. On ARM this is 64K. As a result, the +# produced binaries contain almost 64K zeros preceding the text segment. +# The patch enforces the text segment to be aligned to 4K instead. +# +LD_MARCH += -z max-page-size=0x1000 + include $(call select_from_repositories,mk/spec/32bit.mk)