[U-Boot] efi_loader: handling of global data in *.efi files

Simon Glass sjg at chromium.org
Fri Oct 19 03:25:55 UTC 2018


Hi Heinrich,

On 13 October 2018 at 04:40, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
> Hello Alex, hello Simon,
>
> in arch/arm/lib/elf_aarch64_efi.lds we merge the .bss section into the
> .data section with a comment by Simon:
>
> "The EFI loader doesn't seem to like a .bss section, so we stick it into
> .data".
>
> Real live EFI binaries like iPXE's snp.efi have a .bss section:
>
> Number of Sections 6
> Section[0] .text
> Section[1] .rodata
> Section[2] .data
> Section[3] .bss
> Section[4] .reloc
> Section[5] .debug
>
> Do you remember what the exact problem was with .bss sections?

No I don't - possible a link error?

>
> .bss sections have to be initialized after relocation. I could not find
> any code relating to this in efi_image_loader.c. Did I miss it?

Hmm seems like an omission.

Regards,
Simon


More information about the U-Boot mailing list