bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/26218] Invalid coff/pe arm machine type creating EFI binar


From: kallisti5 at unixzen dot com
Subject: [Bug binutils/26218] Invalid coff/pe arm machine type creating EFI binary
Date: Thu, 09 Jul 2020 15:49:36 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=26218

--- Comment #2 from Alexander von Gluck IV <kallisti5 at unixzen dot com> ---
Hi!

So, my toolchain doesn't have pei-arm-wince-little support, so not an easy
test. (I can work on building a toolchain with pei-arm-wince-little, but it
will take a bit of time)  I'll report back here.


The efi_analyzer tool i'm running is here:
https://github.com/xypron/efi_analyzer/blob/master/efianalyze.c


Essentially, it seems like arm pe objects have a unix/coff focus which never
really existed after 2000 when this was written. I don't think there are really
any valid unix/coff arm targets, so this default behaviour really doesn't even
make sense.

This is why things like gnu-efi do "fake" pe headers:
https://sourceforge.net/p/gnu-efi/code/ci/master/tree/gnuefi/crt0-efi-arm.S

The alternative is moving over to clang/ld.lld since they support this stuff
pretty well natively.
https://dvdhrm.github.io/2019/01/31/goodbye-gnuefi/


It might make sense for the ARM folks (Linaro) to take a look at this one if
they're still around.

Both of these are ideal for improved ARM adoption:

* "easier to generate correct" EFI bootloaders + u-boot now supporting UEFI
* "easier to generate correct" EFI bootloaders + edk2 now supporting ARM UEFI

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]