Blob Blame History Raw
From b3a63019277282415e0c06942b0aa42c4e876582 Mon Sep 17 00:00:00 2001
From: Nigel Croxon <nigel.croxon@hpe.com>
Date: Wed, 17 Feb 2016 15:32:23 -0500
Subject: [PATCH 09/10] arm: fix linker script for building efi binaries

On arm, the linker script is missing section collection for data and
bss.  This causes some symbols (notably static array symbols) not to
get relocated correctly and the resulting efi binary to crash.  Fix
this by correctly collecting all the data and bss sections.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
---
 gnuefi/elf_arm_efi.lds | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnuefi/elf_arm_efi.lds b/gnuefi/elf_arm_efi.lds
index a2f1b01..2ca8fc6 100644
--- a/gnuefi/elf_arm_efi.lds
+++ b/gnuefi/elf_arm_efi.lds
@@ -22,7 +22,7 @@ SECTIONS
    *(.sdata)
    *(.data)
    *(.data1)
-   *(.data)
+   *(.data.*)
    *(.got.plt)
    *(.got)
 
@@ -34,6 +34,7 @@ SECTIONS
    *(.scommon)
    *(.dynbss)
    *(.bss)
+   *(.bss.*)
    *(COMMON)
    . = ALIGN(16);
    _bss_end = .;
-- 
2.5.0