From 7b7c365c5c663ffdfb2b3f696db35c23cdccd921 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Wed, 15 Sep 2021 10:10:46 +0200 Subject: [PATCH] [bfd] Ensure unique printable names for bfd archs Remove duplicate entry in bfd_ft32_arch and bfd_rx_arch. Fix printable name for bfd_mach_n1: "nh1" -> "n1". PR 28336 * cpu-ft32.c (arch_info_struct): Remove "ft32" entry. * cpu-rx.c (arch_info_struct): Remove "rx" entry. * cpu-nds32.c (bfd_nds32_arch): Fix printable name for bfd_mach_n1 entry. --- bfd/cpu-ft32.c | 1 - bfd/cpu-nds32.c | 2 +- bfd/cpu-rx.c | 5 ++--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/bfd/cpu-ft32.c b/bfd/cpu-ft32.c index f7112685e0f..d40ef081be9 100644 --- a/bfd/cpu-ft32.c +++ b/bfd/cpu-ft32.c @@ -43,7 +43,6 @@ static const bfd_arch_info_type arch_info_struct[] = { - N (bfd_mach_ft32, "ft32", false, &arch_info_struct[1]), N (bfd_mach_ft32b, "ft32b", false, NULL) }; diff --git a/bfd/cpu-nds32.c b/bfd/cpu-nds32.c index 3473a569085..e3e9feca10b 100644 --- a/bfd/cpu-nds32.c +++ b/bfd/cpu-nds32.c @@ -42,4 +42,4 @@ static const bfd_arch_info_type arch_info_struct[] = }; const bfd_arch_info_type bfd_nds32_arch = - N (bfd_mach_n1, "n1h", true, NEXT); + N (bfd_mach_n1, "n1", true, NEXT); diff --git a/bfd/cpu-rx.c b/bfd/cpu-rx.c index 601523691bf..9d9d4c79761 100644 --- a/bfd/cpu-rx.c +++ b/bfd/cpu-rx.c @@ -27,10 +27,9 @@ bfd_default_compatible, bfd_default_scan, \ bfd_arch_default_fill, next, 0 } -static const bfd_arch_info_type arch_info_struct[3] = +static const bfd_arch_info_type arch_info_struct[2] = { - N (bfd_mach_rx, "rx", 3, false, arch_info_struct + 1), - N (bfd_mach_rx_v2, "rx:v2", 3, false, arch_info_struct + 2), + N (bfd_mach_rx_v2, "rx:v2", 3, false, arch_info_struct + 1), N (bfd_mach_rx_v3, "rx:v3", 3, false, NULL) }; -- 2.30.2