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: 144403 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp1168844vqu; Mon, 25 Sep 2023 05:22:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGzJdlRksIRsZ9hw4gyToWTVpF6dQcd3HKX8JMYanzJnzTQGUtI2VjLw0oEotAVN5qhme+f X-Received: by 2002:a2e:9887:0:b0:2bc:ce85:2de2 with SMTP id b7-20020a2e9887000000b002bcce852de2mr5576150ljj.37.1695644576958; Mon, 25 Sep 2023 05:22:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695644576; cv=none; d=google.com; s=arc-20160816; b=GIu+3x0Vo4e4jJPRb9D/lHUwWrhfkXFRfBQtnQxqQ61wNXANvgMBlQlJ2m462CnflJ wkLZe6/QhgcRmOkFfN/nYS2k4VNBp1Z9ctVaM7A3xCeTvs+AF5DvnWWTVa29Lj478iFS Bg7HwqdRY0nzbWCPLWxBFpQ4ngAgDYl71OKh2RCNGW3X+Y4heQaFRTYYvsiS6Ok62wBh zPFQMkrP3ad/eMlqaap1YpVezjJBzPlO2vSNjAp6r1iQXtJSw//TPSCpTejErTtCaJaS 9CiqaqqJposFgbMkDB+iVcuZrQbX8iFvwC3YVY07G6s2JxQYlL6utJD1mujitODZibzT AOoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=xWa/3K8iyBTAC9d5B8d0hyRYSjUKt1cGrY7kBvBjGa4=; fh=XLB4P52z3bowZIMYoHP4s72Zxh9XCg9ZyOgY1lGe8/4=; b=r8fwAsfVGvNu3l9hs4RTkEG2IzFIYxW5wX+cgxV/XCJXGVNKnOAnfAnhnWRtg9coTQ /W46uBNx1KyT+j4qJrj+tRfGcw90BICZgHmesI1ONVgKi92K+IUai34v2McPMDagibzt yWcbeUZiPCZcy9rGLOUwZmH3kblPgu6vI2hvJAABv4u8U8jfoa/uq1QBMDm7RFQWZDey Q8FUctEgonv9W3LLHigtwlFpj1G5sD4MKwxYDBuS7XofrmJEO8gs0Tdmuq2GpDU80JZH uprqvZY89qoyKQ71c7w40M+K9PVufkxZxRorhNetkp3vtoG2V3qloVP100ZLl1tAyYgy +1jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=SpDb5XoU; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id i13-20020a1709061ccd00b0098df1cbe2aesi8612327ejh.1008.2023.09.25.05.22.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 05:22:56 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=SpDb5XoU; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9D8363857033 for ; Mon, 25 Sep 2023 12:22:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D8363857033 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1695644575; 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=SpDb5XoUi3pLQkfZ955CpPu0t8ZwsMXVSBW0WSE1iYw3l2bnX04/vqyJJ9olTPUYe E3VBw9ZtwLGQzXcAEGRbGf/RE9Fyv4w80kKEhZrRc8KcEq0rDwYK6zsDQiWPEDuE/I OOEo2fev9ZV9KBhNoTPuC3Um1zyZbJdbbXDQFYc8= 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-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+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778012207784909463 X-GMAIL-MSGID: 1778012207784909463 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