From patchwork Mon Sep 25 12:22:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Zissulescu Ianculescu X-Patchwork-Id: 76644 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EB06C385772F for ; Mon, 25 Sep 2023 12:23:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EB06C385772F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1695644595; bh=xWa/3K8iyBTAC9d5B8d0hyRYSjUKt1cGrY7kBvBjGa4=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=csjPwKaPUFV3aOUFJ3cL5jnT2fnyG9UlUWpDSl9IV8q6GiGUxiTeI4iG7d294sRsk 355nXvGlmkOEkmH3iIUx9Hjicqbn2qVJhU6hw+nc6v/86UWAZhXOzMIOQbxWxRHsSw HcXjN5/H83pfQ920SWtv9T+4DEIw4eS9vSWcmvhk= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by sourceware.org (Postfix) with ESMTPS id 394E63858C62 for ; Mon, 25 Sep 2023 12:22:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 394E63858C62 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2c131ddfeb8so92888841fa.3 for ; Mon, 25 Sep 2023 05:22:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695644565; x=1696249365; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xWa/3K8iyBTAC9d5B8d0hyRYSjUKt1cGrY7kBvBjGa4=; b=SUiWt2IFZ459qgeVXMbiKtmySCn78EVVHU3srh8RpaNh3zxhHDGQ0jmpDlNlO+aGA6 shYB2E6o/HtO+VlQYzdxboaslCHBL2L+4FuNPEX8krxdi2CFhjhmQ2SdE1OCmmoMSP7T gVWtfZmp328W2ocxFiSS7BuXGUfcHfosD8+K9fYXvTvCe8/42dz41iY81WqfGmCXjPyB 2NCmjfACsiOqY+xIwNasnPdZIt7BFJWWDeh7/cErWM3i2LTHzpaE3z+u7J28Et2xcqsp Lm2mFlR/xzsyqLruFp07AsSgH++nLdBqjA+79P4GHQ92WM8J5uv8ZCwuRwjuOI9qZIJY IRJw== X-Gm-Message-State: AOJu0YxiWHidUoCQr7uVtcxQOjcOaZzL8gxZz+rUKvtdCIThLYjQ3SU2 HdJr3p0KcFPlpghosmex2MStBcWWYcI= X-Google-Smtp-Source: AGHT+IFb+VGV6+i7MBD5nSXbPnPkHJxWBT5aEcwNd+2nSRFLLn7V9GfjpuX7uURBJwshPIEhTpL9qg== X-Received: by 2002:a2e:95d6:0:b0:2bc:b70d:9cb5 with SMTP id y22-20020a2e95d6000000b002bcb70d9cb5mr5468303ljh.33.1695644564897; Mon, 25 Sep 2023 05:22:44 -0700 (PDT) Received: from fatty.nomansland ([193.187.151.25]) by smtp.gmail.com with ESMTPSA id sd18-20020a170906ce3200b009a198078c53sm6203591ejb.214.2023.09.25.05.22.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 05:22:44 -0700 (PDT) To: binutils@sourceware.org Cc: fbedard@synopsys.com Subject: [committed] arc: Update bfd arc pattern file to allow enable-targets=all Date: Mon, 25 Sep 2023 15:22:43 +0300 Message-Id: <20230925122243.485499-1-claziss@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Claudiu Zissulescu via Binutils From: Claudiu Zissulescu Ianculescu Reply-To: Claudiu Zissulescu Errors-To: binutils-bounces+patchwork=sourceware.org@sourceware.org Sender: "Binutils" 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 --- 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