[PATCH] [ARM] Update knowledge of bfd architectures

Thomas Preudhomme thomas.preudhomme@linaro.org
Fri Oct 26 13:32:00 GMT 2018


And now with a patch.
On Fri, 26 Oct 2018 at 14:30, Thomas Preudhomme
<thomas.preudhomme@linaro.org> wrote:
>
> Hi,
>
> Commit c0c468d562649df0f695737262b6230b7a56a4bb updated bfd's knowledge
> of Arm architectures to Armv5TEJ and later but missed a couple of
> locations. Missing one that this patch cover are:
>
> - processor list in bfd/cpu-arm.c used by objdump to select a CPU to
>   disassemble for
> - architecture lists for .note.gnu.arm.ident notes used by GAS
>   (bfd_arm_update_notes ()) and objcopy (architectures array used by
>   bfd_arm_get_mach_from_notes ())
> - architectures to set bfd mach to in GAS' md_begin ()
>
> Note that the CPU list in bfd/cpu-arm.c was simply copied over from
> GAS' CPU list but sorted alphabetically as already done for existing
> entries. When working on this I've noticed that none of the existing
> testcase in the whole binutils covered the note codepaths so I've added
> testcases even for already present architectures. I've only ever managed
> for bfd_arm_get_mach_from_notes () to have an effect by using objcopy on
> a file with a note but no Arm build attribute. I thus make use of both
> objcopy supported by run_dump_test which requires to have an ld line as
> well. This is now possible with the separate patch posted to fix ld
> action in run_dump_test.
>
> ChangeLog entries are as follows:
>
> *** bfd/ChangeLog ***
>
> 2018-10-26  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
>
> * cpu-arm.c (processors): Add processors known to GAS but missing here
> and reindent.
> (bfd_arm_update_notes): Add support Armv5TEJ and later architectures.
> (architectures): Likewise and reindent.
>
> *** gas/ChangeLog ***
>
> 2018-10-26  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
>
> * config/tc-arm.c (arm_ext_v6m): Define.
> (md_begin): Add support for Armv5TEJ and later architectures.
> Fix detection of Maverick when in architecture autodetection mode.
> * testsuite/gas/arm/cpu-arm1020.d: New testcase.
> * testsuite/gas/arm/cpu-arm1020e.d: Likewise.
> * testsuite/gas/arm/cpu-arm1020t.d: Likewise.
> * testsuite/gas/arm/cpu-arm1022e.d: Likewise.
> * testsuite/gas/arm/cpu-arm1026ej-s.d: Likewise.
> * testsuite/gas/arm/cpu-arm1026ejs.d: Likewise.
> * testsuite/gas/arm/cpu-arm10e.d: Likewise.
> * testsuite/gas/arm/cpu-arm10t.d: Likewise.
> * testsuite/gas/arm/cpu-arm10tdmi.d: Likewise.
> * testsuite/gas/arm/cpu-arm1136j-s.d: Likewise.
> * testsuite/gas/arm/cpu-arm1136jf-s.d: Likewise.
> * testsuite/gas/arm/cpu-arm1136jfs.d: Likewise.
> * testsuite/gas/arm/cpu-arm1136js.d: Likewise.
> * testsuite/gas/arm/cpu-arm1156t2-s.d: Likewise.
> * testsuite/gas/arm/cpu-arm1156t2f-s.d: Likewise.
> * testsuite/gas/arm/cpu-arm1176jz-s.d: Likewise.
> * testsuite/gas/arm/cpu-arm1176jzf-s.d: Likewise.
> * testsuite/gas/arm/cpu-arm2.d: Likewise.
> * testsuite/gas/arm/cpu-arm250.d: Likewise.
> * testsuite/gas/arm/cpu-arm3.d: Likewise.
> * testsuite/gas/arm/cpu-arm6.d: Likewise.
> * testsuite/gas/arm/cpu-arm60.d: Likewise.
> * testsuite/gas/arm/cpu-arm600.d: Likewise.
> * testsuite/gas/arm/cpu-arm610.d: Likewise.
> * testsuite/gas/arm/cpu-arm620.d: Likewise.
> * testsuite/gas/arm/cpu-arm7.d: Likewise.
> * testsuite/gas/arm/cpu-arm70.d: Likewise.
> * testsuite/gas/arm/cpu-arm700.d: Likewise.
> * testsuite/gas/arm/cpu-arm700i.d: Likewise.
> * testsuite/gas/arm/cpu-arm710.d: Likewise.
> * testsuite/gas/arm/cpu-arm7100.d: Likewise.
> * testsuite/gas/arm/cpu-arm710c.d: Likewise.
> * testsuite/gas/arm/cpu-arm710t.d: Likewise.
> * testsuite/gas/arm/cpu-arm720.d: Likewise.
> * testsuite/gas/arm/cpu-arm720t.d: Likewise.
> * testsuite/gas/arm/cpu-arm740t.d: Likewise.
> * testsuite/gas/arm/cpu-arm7500.d: Likewise.
> * testsuite/gas/arm/cpu-arm7500fe.d: Likewise.
> * testsuite/gas/arm/cpu-arm7d.d: Likewise.
> * testsuite/gas/arm/cpu-arm7di.d: Likewise.
> * testsuite/gas/arm/cpu-arm7dm.d: Likewise.
> * testsuite/gas/arm/cpu-arm7dmi.d: Likewise.
> * testsuite/gas/arm/cpu-arm7m.d: Likewise.
> * testsuite/gas/arm/cpu-arm7t.d: Likewise.
> * testsuite/gas/arm/cpu-arm7tdmi-s.d: Likewise.
> * testsuite/gas/arm/cpu-arm7tdmi.d: Likewise.
> * testsuite/gas/arm/cpu-arm8.d: Likewise.
> * testsuite/gas/arm/cpu-arm810.d: Likewise.
> * testsuite/gas/arm/cpu-arm9.d: Likewise.
> * testsuite/gas/arm/cpu-arm920.d: Likewise.
> * testsuite/gas/arm/cpu-arm920t.d: Likewise.
> * testsuite/gas/arm/cpu-arm922t.d: Likewise.
> * testsuite/gas/arm/cpu-arm926ej-s.d: Likewise.
> * testsuite/gas/arm/cpu-arm926ej.d: Likewise.
> * testsuite/gas/arm/cpu-arm926ejs.d: Likewise.
> * testsuite/gas/arm/cpu-arm940t.d: Likewise.
> * testsuite/gas/arm/cpu-arm946e-r0.d: Likewise.
> * testsuite/gas/arm/cpu-arm946e-s.d: Likewise.
> * testsuite/gas/arm/cpu-arm946e.d: Likewise.
> * testsuite/gas/arm/cpu-arm966e-r0.d: Likewise.
> * testsuite/gas/arm/cpu-arm966e-s.d: Likewise.
> * testsuite/gas/arm/cpu-arm966e.d: Likewise.
> * testsuite/gas/arm/cpu-arm968e-s.d: Likewise.
> * testsuite/gas/arm/cpu-arm9e-r0.d: Likewise.
> * testsuite/gas/arm/cpu-arm9e.d: Likewise.
> * testsuite/gas/arm/cpu-arm9tdmi.d: Likewise.
> * testsuite/gas/arm/cpu-arm_any.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-a12.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-a15.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-a17.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-a32.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-a35.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-a5.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-a53.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-a55.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-a57.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-a7.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-a72.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-a73.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-a75.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-a76.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-a8.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-a9.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-m0.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-m0plus.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-m1.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-m23.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-m3.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-m33.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-m4.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-m7.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-r4.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-r4f.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-r5.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-r52.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-r7.d: Likewise.
> * testsuite/gas/arm/cpu-cortex-r8.d: Likewise.
> * testsuite/gas/arm/cpu-ep9312.d: Likewise.
> * testsuite/gas/arm/cpu-exynos-m1.d: Likewise.
> * testsuite/gas/arm/cpu-fa526.d: Likewise.
> * testsuite/gas/arm/cpu-fa606te.d: Likewise.
> * testsuite/gas/arm/cpu-fa616te.d: Likewise.
> * testsuite/gas/arm/cpu-fa626.d: Likewise.
> * testsuite/gas/arm/cpu-fa626te.d: Likewise.
> * testsuite/gas/arm/cpu-fa726te.d: Likewise.
> * testsuite/gas/arm/cpu-fmp626.d: Likewise.
> * testsuite/gas/arm/cpu-i80200.d: Likewise.
> * testsuite/gas/arm/cpu-iwmmxt.d: Likewise.
> * testsuite/gas/arm/cpu-iwmmxt2.d: Likewise.
> * testsuite/gas/arm/cpu-marvell-pj4.d: Likewise.
> * testsuite/gas/arm/cpu-marvell-whitney.d: Likewise.
> * testsuite/gas/arm/cpu-mpcore.d: Likewise.
> * testsuite/gas/arm/cpu-mpcorenovfp.d: Likewise.
> * testsuite/gas/arm/cpu-sa1.d: Likewise.
> * testsuite/gas/arm/cpu-strongarm.d: Likewise.
> * testsuite/gas/arm/cpu-strongarm1.d: Likewise.
> * testsuite/gas/arm/cpu-strongarm110.d: Likewise.
> * testsuite/gas/arm/cpu-strongarm1100.d: Likewise.
> * testsuite/gas/arm/cpu-strongarm1110.d: Likewise.
> * testsuite/gas/arm/cpu-xgene1.d: Likewise.
> * testsuite/gas/arm/cpu-xgene2.d: Likewise.
> * testsuite/gas/arm/cpu-xscale.d: Likewise.
> * testsuite/gas/arm/nop-asm.s: Likewise.
> * testsuite/gas/arm/note-march-armv2.d: Likewise.
> * testsuite/gas/arm/note-march-armv2.s: Likewise.
> * testsuite/gas/arm/note-march-armv2a.d: Likewise.
> * testsuite/gas/arm/note-march-armv2a.s: Likewise.
> * testsuite/gas/arm/note-march-armv3.d: Likewise.
> * testsuite/gas/arm/note-march-armv3.s: Likewise.
> * testsuite/gas/arm/note-march-armv3m.d: Likewise.
> * testsuite/gas/arm/note-march-armv3m.s: Likewise.
> * testsuite/gas/arm/note-march-armv4.d: Likewise.
> * testsuite/gas/arm/note-march-armv4.s: Likewise.
> * testsuite/gas/arm/note-march-armv4t.d: Likewise.
> * testsuite/gas/arm/note-march-armv4t.s: Likewise.
> * testsuite/gas/arm/note-march-armv5.d: Likewise.
> * testsuite/gas/arm/note-march-armv5.s: Likewise.
> * testsuite/gas/arm/note-march-armv5t.d: Likewise.
> * testsuite/gas/arm/note-march-armv5t.s: Likewise.
> * testsuite/gas/arm/note-march-armv5te.d: Likewise.
> * testsuite/gas/arm/note-march-armv5te.d: Likewise.
> * testsuite/gas/arm/note-march-armv5tej.d: Likewise.
> * testsuite/gas/arm/note-march-armv5tej.s: Likewise.
> * testsuite/gas/arm/note-march-armv6-m.d: Likewise.
> * testsuite/gas/arm/note-march-armv6-m.d: Likewise.
> * testsuite/gas/arm/note-march-armv6.d: Likewise.
> * testsuite/gas/arm/note-march-armv6.s: Likewise.
> * testsuite/gas/arm/note-march-armv6k.d: Likewise.
> * testsuite/gas/arm/note-march-armv6k.s: Likewise.
> * testsuite/gas/arm/note-march-armv6kz.d: Likewise.
> * testsuite/gas/arm/note-march-armv6kz.s: Likewise.
> * testsuite/gas/arm/note-march-armv6s-m.d: Likewise.
> * testsuite/gas/arm/note-march-armv6s-m.s: Likewise.
> * testsuite/gas/arm/note-march-armv6t2.d: Likewise.
> * testsuite/gas/arm/note-march-armv6t2.s: Likewise.
> * testsuite/gas/arm/note-march-armv7-a.d: Likewise.
> * testsuite/gas/arm/note-march-armv7-m.d: Likewise.
> * testsuite/gas/arm/note-march-armv7-r.d: Likewise.
> * testsuite/gas/arm/note-march-armv7.s: Likewise.
> * testsuite/gas/arm/note-march-armv7e-m.d: Likewise.
> * testsuite/gas/arm/note-march-armv7e-m.s: Likewise.
> * testsuite/gas/arm/note-march-armv8-a.d: Likewise.
> * testsuite/gas/arm/note-march-armv8-a.s: Likewise.
> * testsuite/gas/arm/note-march-armv8-m.base.d: Likewise.
> * testsuite/gas/arm/note-march-armv8-m.base.s: Likewise.
> * testsuite/gas/arm/note-march-armv8-m.main.d: Likewise.
> * testsuite/gas/arm/note-march-armv8-m.main.s: Likewise.
> * testsuite/gas/arm/note-march-armv8-r.d: Likewise.
> * testsuite/gas/arm/note-march-armv8-r.s: Likewise.
> * testsuite/gas/arm/note-march-ep9312.d: Likewise.
> * testsuite/gas/arm/note-march-ep9312.s: Likewise.
> * testsuite/gas/arm/note-march-iwmmxt.d: Likewise.
> * testsuite/gas/arm/note-march-iwmmxt.s: Likewise.
> * testsuite/gas/arm/note-march-iwmmxt2.d: Likewise.
> * testsuite/gas/arm/note-march-iwmmxt2.s: Likewise.
> * testsuite/gas/arm/note-march-xscale.d: Likewise.
> * testsuite/gas/arm/note-march-xscale.s: Likewise.
>
> Testing: No testsuite regression when targeting arm-none-eabi.
>
> Is this ok for master?
>
> Best regards,
>
> Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: update_knowledge_bfd_archs.patch
Type: text/x-patch
Size: 116668 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20181026/68cdd518/attachment.bin>


More information about the Binutils mailing list