瀏覽代碼

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>
Nigel Croxon 9 年之前
父節點
當前提交
06db4a2b53
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      gnuefi/elf_arm_efi.lds

+ 2 - 1
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 = .;