[PATCH v1 14/14] arm64: qcom: define LDFLAGS_u-boot-elf for 4K ELF granules
Aswin Murugan via U-Boot <[email protected]>
| Newsgroups | gmane.comp.boot-loaders.u-boot.general,gmane.comp.boot-loaders.u-boot |
|---|---|
| Message-ID | <[email protected]> |
CONFIG_REMAKE_ELF_LDSCRIPT alone leaves u-boot.elf linked with the toolchain's default page-size flags. Set LDFLAGS_u-boot-elf to the same 4K granule flags used for u-boot.bin, for any ARCH_SNAPDRAGON board, not just nord. Signed-off-by: Aswin Murugan <[email protected]> --- arch/arm/config.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/config.mk b/arch/arm/config.mk index bce9a31e966..a609d90225b 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -120,6 +120,13 @@ ifeq ($(CONFIG_ARM64),y) LDFLAGS_u-boot += -z common-page-size=0x1000 -z max-page-size=0x1000 endif +ifeq ($(CONFIG_ARCH_SNAPDRAGON),y) +# The CONFIG_REMAKE_ELF u-boot.elf link step doesn't pick up the +# 4K page-size flags used for u-boot.bin above, so wire them in here +# too. TME's IMGAUTH requires 4K-aligned ELF segments. +LDFLAGS_u-boot-elf += -z common-page-size=0x1000 -z max-page-size=0x1000 +endif + # # FIXME: binutils versions < 2.22 have a bug in the assembler where # branches to weak symbols can be incorrectly optimized in thumb mode -- 2.34.1