public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [committed] arc: Update bfd arc pattern file to allow enable-targets=all
@ 2023-09-25 12:22 Claudiu Zissulescu
  0 siblings, 0 replies; only message in thread
From: Claudiu Zissulescu @ 2023-09-25 12:22 UTC (permalink / raw)
  To: binutils; +Cc: fbedard

The ARC backend uses a BFD pattern file to generate three ARC targets:
- an BFD ARC target for ARCv1 and ARCv2 CPU families. It also works
for big-endian variants.
- an BFD ARC64 target for ARCv3 64bit machines. It also allows working
with ARCv3 32bit machines.
- an BFD ARC32 target for ARCv4 32bit machines. It also allows working
with ARCv3 64bit machines.

When configuring with `--enable-targets=all` some patterns are defined
multiple times. Fix this issue.

Signed-off-by: Claudiu Zissulescu <claziss@gmail.com>
---
 bfd/elfnn-arc.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/bfd/elfnn-arc.c b/bfd/elfnn-arc.c
index 04fce7eb6e0..f3ff157f809 100644
--- a/bfd/elfnn-arc.c
+++ b/bfd/elfnn-arc.c
@@ -32,8 +32,8 @@
 
 #include "arc-plt.h"
 
-#define FEATURE_LIST_NAME bfdNN_feature_list
-#define CONFLICT_LIST bfdNN_conflict_list
+#define FEATURE_LIST_NAME bfdNN_ARCAA_feature_list
+#define CONFLICT_LIST bfdNN_ARCAA_conflict_list
 #include "opcode/arc-attrs.h"
 
 /* Possible ARC architectures.  */
@@ -3006,7 +3006,7 @@ arc_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
 /* We use this so we can override certain functions
    (though currently we don't).  */
 
-const struct elf_size_info arc_elfNN_size_info =
+const struct elf_size_info ARCAA_elfNN_size_info =
   {
    sizeof (ElfNN_External_Ehdr),
    sizeof (ElfNN_External_Phdr),
@@ -3541,7 +3541,11 @@ arc_elf_relax_section (bfd *abfd, asection *sec,
 
 #define TARGET_LITTLE_SYM   arcAA_elfNN_le_vec
 #define TARGET_LITTLE_NAME  "elfNN-littlearcAA"
-#define TARGET_BIG_SYM	    arc_elfNN_be_vec
+
+#if (ARCH_TYPE == ARC) && (ARCH_SIZE == 32)
+# define TARGET_BIG_SYM	    arc_elfNN_be_vec
+#endif
+
 #define TARGET_BIG_NAME     "elfNN-bigarc"
 #define ELF_ARCH	    ARC_BFD_ARCH
 #define ELF_TARGET_ID	    ARC_ELF_DATA
@@ -3567,7 +3571,7 @@ arc_elf_relax_section (bfd *abfd, asection *sec,
 #define bfd_elfNN_bfd_copy_private_bfd_data     arc_elf_copy_private_bfd_data
 #define bfd_elfNN_bfd_relax_section		arc_elf_relax_section
 
-#define elf_backend_size_info		     arc_elfNN_size_info
+#define elf_backend_size_info		     ARCAA_elfNN_size_info
 
 #define elf_info_to_howto_rel		     arc_info_to_howto_rel
 #define elf_backend_object_p		     arc_elf_object_p
-- 
2.30.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-25 12:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-25 12:22 [committed] arc: Update bfd arc pattern file to allow enable-targets=all Claudiu Zissulescu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).