[PATCH v3] aarch64-pe support for LD, GAS and BFD

zac.walker@linaro.org zac.walker@linaro.org
Wed Oct 19 09:48:56 GMT 2022


Sorry - this patch caused a build break:

checking for PT_GETDBREGS... /usr/bin/ld: ../bfd/.libs/libbfd.a(targets.o):(.data.rel.ro+0x48): undefined reference to `aarch64_pe_le_vec'
/usr/bin/ld: ../bfd/.libs/libbfd.a(targets.o):(.data.rel.ro+0x17c0): undefined reference to `aarch64_pe_le_vec'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:1276: as-new] Error 1

Investigating now and hope to fix soon (or roll back.)

Zac

-----Original Message-----
From: Zac Walker <zac.walker@linaro.org> 
Sent: 14 October 2022 09:58
To: binutils@sourceware.org
Subject: [PATCH v3] aarch64-pe support for LD, GAS and BFD

V3 of the patch originally written by Jedidiah Thompson. It allows aarch64-pe to be targeted natively, not having to use objcopy to convert it from ELF to PE.


Between V2 and V3 I made a few recommended updates most notably adding the missing BFD_RELOC_AARCH64_BRANCH19 and additional const correctness. I have included a diff between patches v2 and v3. Patch and diff included as attachments to avoid text formatting issues.


Changes since that original patch:

- Added minimal relocation support and tested generated binaries run on a Surface-ProX ARM64 test machine.

- Been through a review process with colleagues at Linaro. Linaro has agreed to run CI for aarch64-pe going forward in their test lab.

- Run tests for multiple platforms; aarch64-linux-gnu, x86_64-linux-gnu, x86_64-w64-mingw32. Those tests pass and see no regressions. Multiple GAS tests still fail for aarch64-pe because of ELF specific assumptions. I plan to fix these later.


The long-term goal of this work is to help enable MSYS2 for Window on ARM64. As discussed here: https://github.com/msys2/MSYS2-packages/issues/1888


The original work by Jedidiah Thompson here can be found here: https://sourceware.org/pipermail/binutils/2022-January/119077.html


Regards,
Zac Walker



More information about the Binutils mailing list