bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/26206] Add pei-aarch64 support for native EFI support


From: pjones at redhat dot com
Subject: [Bug binutils/26206] Add pei-aarch64 support for native EFI support
Date: Thu, 28 Oct 2021 16:51:45 +0000

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

--- Comment #22 from pjones at redhat dot com <pjones at redhat dot com> ---
Created attachment 13739
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13739&action=edit
add aarch64_pei_vec to aarch64-*-linux* as well

I had to add the attached patch as well to get the targets we build for to
include it.  With this, some basic support does appear to be functional, though
I'm nowhere near done trying it.

One thing I have noticed is that the objdump arch list is... a little
surprising.  We configure the build as such:
../binutils-2.37/configure --disable-dependency-tracking --disable-silent-rules
--enable-checking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin
--sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
--includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec
--localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man
--infodir=/usr/share/info --build=x86_64-redhat-linux-gnu
--host=x86_64-redhat-linux-gnu --target=aarch64-linux-gnu
--program-prefix=aarch64-linux-gnu- --disable-shared --disable-install_libbfd
--with-sysroot=/usr/aarch64-linux-gnu/sys-root
--enable-deterministic-archives=no --enable-compressed-debug-sections=none
--enable-generate-build-notes=no --enable-lto --enable-64-bit-bfd
--enable-targets=x86_64-pep --enable-relro=yes --enable-plugins
--with-bugurl=http://bugzilla.redhat.com/bugzilla/

When we do that, we get these targets in "objdump --help":
aarch64-linux-gnu-objdump: supported targets: elf64-littleaarch64
elf64-bigaarch64 elf32-littleaarch64 elf32-bigaarch64 elf32-littlearm
elf32-bigarm pei-aarch64-little elf64-little elf64-big elf32-little elf32-big
pe-x86-64 pei-x86-64 pe-bigobj-x86-64 elf64-x86-64 elf64-l1om elf64-k1om
pe-i386 pei-i386 elf32-i386 elf32-iamcu srec symbolsrec verilog tekhex binary
ihex plugin

It's not surprising to see the x86 targets there (we have
--enable-targets=x86_64-pep after all), but I don't see the pe*-aarch64* or
efi-* targets here at all, nor do I see them in objcopy.  That said, clearly
the basic support has *worked* in objdump:
random:~/devel/fedora/cross-binutils/f35$ aarch64-linux-gnu-objdump -fh
shimaa64.efi

shimaa64.efi:     file format pei-aarch64-little
architecture: aarch64, flags 0x00000103:
HAS_RELOC, EXEC_P, D_PAGED
start address 0x0000000000001000

Sections:
Idx Name          Size      VMA               LMA               File off  Algn
  0 .text         00094000  0000000000001000  0000000000001000  00001000  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .data         000325f0  0000000000095000  0000000000095000  00095000  2**2
                  CONTENTS, ALLOC, LOAD, DATA

That's a big step forward, and I'd support upstreaming the patch as is (plus my
minor tweak) just for that.  Next I'll try building stuff more like we do on
x86_64, but that probably won't happen until next week due to other
commitments.

-- 
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]