1b3f362
From b3a63019277282415e0c06942b0aa42c4e876582 Mon Sep 17 00:00:00 2001
1b3f362
From: Nigel Croxon <nigel.croxon@hpe.com>
1b3f362
Date: Wed, 17 Feb 2016 15:32:23 -0500
1b3f362
Subject: [PATCH 09/10] arm: fix linker script for building efi binaries
1b3f362
1b3f362
On arm, the linker script is missing section collection for data and
1b3f362
bss.  This causes some symbols (notably static array symbols) not to
1b3f362
get relocated correctly and the resulting efi binary to crash.  Fix
1b3f362
this by correctly collecting all the data and bss sections.
1b3f362
1b3f362
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
1b3f362
Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
1b3f362
---
1b3f362
 gnuefi/elf_arm_efi.lds | 3 ++-
1b3f362
 1 file changed, 2 insertions(+), 1 deletion(-)
1b3f362
1b3f362
diff --git a/gnuefi/elf_arm_efi.lds b/gnuefi/elf_arm_efi.lds
1b3f362
index a2f1b01..2ca8fc6 100644
1b3f362
--- a/gnuefi/elf_arm_efi.lds
1b3f362
+++ b/gnuefi/elf_arm_efi.lds
1b3f362
@@ -22,7 +22,7 @@ SECTIONS
1b3f362
    *(.sdata)
1b3f362
    *(.data)
1b3f362
    *(.data1)
1b3f362
-   *(.data)
1b3f362
+   *(.data.*)
1b3f362
    *(.got.plt)
1b3f362
    *(.got)
1b3f362
 
1b3f362
@@ -34,6 +34,7 @@ SECTIONS
1b3f362
    *(.scommon)
1b3f362
    *(.dynbss)
1b3f362
    *(.bss)
1b3f362
+   *(.bss.*)
1b3f362
    *(COMMON)
1b3f362
    . = ALIGN(16);
1b3f362
    _bss_end = .;
1b3f362
-- 
1b3f362
2.5.0
1b3f362