From c8f7b19ed60b195050b13e8130561116090adc97 Mon Sep 17 00:00:00 2001 From: patrick Date: Thu, 30 Aug 2018 14:39:46 +0000 Subject: [PATCH] Move .dynstr before _edata to fix image size calculation. The PE header contains an image size field that is calculated using the difference between the start of the header and edata. Since we copy out .dynstr into the EFI binary, make sure that .dynstr is before edata so that it's included in the image size. This makes it consistent with efiboot on armv7. ok kettenis@ --- sys/arch/arm64/stand/efiboot/ldscript.arm64 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arch/arm64/stand/efiboot/ldscript.arm64 b/sys/arch/arm64/stand/efiboot/ldscript.arm64 index cdf6876d6df..b408f10b269 100644 --- a/sys/arch/arm64/stand/efiboot/ldscript.arm64 +++ b/sys/arch/arm64/stand/efiboot/ldscript.arm64 @@ -1,4 +1,4 @@ -/* $OpenBSD: ldscript.arm64,v 1.1 2016/12/17 23:38:33 patrick Exp $ */ +/* $OpenBSD: ldscript.arm64,v 1.2 2018/08/30 14:39:46 patrick Exp $ */ /* OUTPUT_FORMAT("elf64-aarch64-freebsd", "elf64-aarch64-freebsd", "elf64-aarch64-freebsd") */ @@ -77,9 +77,9 @@ SECTIONS .reloc : { *(.reloc) } . = ALIGN(16); .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } _edata = .; /* Unused sections */ - .dynstr : { *(.dynstr) } .hash : { *(.hash) } } -- 2.20.1