Переглянути джерело

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)
    *(.sdata)
    *(.data)
    *(.data)
    *(.data1)
    *(.data1)
-   *(.data)
+   *(.data.*)
    *(.got.plt)
    *(.got.plt)
    *(.got)
    *(.got)
 
 
@@ -34,6 +34,7 @@ SECTIONS
    *(.scommon)
    *(.scommon)
    *(.dynbss)
    *(.dynbss)
    *(.bss)
    *(.bss)
+   *(.bss.*)
    *(COMMON)
    *(COMMON)
    . = ALIGN(16);
    . = ALIGN(16);
    _bss_end = .;
    _bss_end = .;