From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20053.outbound.protection.outlook.com [40.107.2.53]) by sourceware.org (Postfix) with ESMTPS id 42A5C3858403 for ; Fri, 22 Apr 2022 13:25:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 42A5C3858403 Received: from DB6PR0501CA0041.eurprd05.prod.outlook.com (2603:10a6:4:67::27) by DBBPR08MB4902.eurprd08.prod.outlook.com (2603:10a6:10:db::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.20; Fri, 22 Apr 2022 13:25:44 +0000 Received: from DB5EUR03FT044.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:67:cafe::b0) by DB6PR0501CA0041.outlook.office365.com (2603:10a6:4:67::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.15 via Frontend Transport; Fri, 22 Apr 2022 13:25:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT044.mail.protection.outlook.com (10.152.21.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14 via Frontend Transport; Fri, 22 Apr 2022 13:25:44 +0000 Received: ("Tessian outbound 2d401af10eb3:v118"); Fri, 22 Apr 2022 13:25:44 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 44535f28ceb1cbb5 X-CR-MTA-TID: 64aa7808 Received: from 9ba63e5c7f3f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 51D8BD1F-91D1-4375-9B35-C16DB35EA207.1; Fri, 22 Apr 2022 13:25:37 +0000 Received: from EUR02-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 9ba63e5c7f3f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 22 Apr 2022 13:25:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HmuVxdd2KKufcmu2uNfILQQXA/PVBhyvWI4Q/XaE5m1Bs7dSe7Ao84E79nXrmiMK2ZSM1HnSq/OXUCWSX6Vjsx59U8zItzJ80hl2j3bys5KHMnOxAvqtvSXtrGVQrFRxjPothw/Ha7FcY15moR7f4xltCfnYLiNUY4pZEETT/P0GJcDf1hMM2xO6mNKuA5g4JeRuL+vjv4mwNKx5m5GCwv43lf33/KInf7YEzHvhGmL9xSNVOI6NlmPrrPsgJqaG0wBfP3BznshCD1DSHAb7u/Dp+g/vh84Te3tRoO02i3om9oxuX9X9sYxAj24lVznYH1OYl4F0IAzu3a34qJQM3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=keZpmRjj2GYSb2JZw05VPeI4FceNPfEB11FUaF6851I=; b=GAR46BdtBv9Jb+EMV24qJm0hHU/EPEh1zh8KKccIePB+L/uDgqz9u6VLXdGyMSiTJotBPjO6Xmmt/lVU5jJpzD+ECgidtz2eMbz3VdlvhcysaZ89/7fZDpFt1jhOPBQl+rohsvvXtD/YxJ2iTrzgG1IIIo2W40hmFobOX8bj6JyuOFzprAR8lxYzhFM+l68q/reDduFLfmUGYDlzRjlEl8CBwyLLhn48yy5tYSgM4beVorukVLo2KlwNi4f5g/BH/sqSz9KR9WA0vA2jBmjQFWShu5Ksh1sZ03rueWZmJMdUWWh7DnZkJF4BEZUL0oGl9Cp1mjIEK22HIi3udGyv/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from AM6P192CA0086.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:8d::27) by AS8PR08MB5991.eurprd08.prod.outlook.com (2603:10a6:20b:29f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14; Fri, 22 Apr 2022 13:25:34 +0000 Received: from VE1EUR03FT061.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8d:cafe::32) by AM6P192CA0086.outlook.office365.com (2603:10a6:209:8d::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14 via Frontend Transport; Fri, 22 Apr 2022 13:25:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT061.mail.protection.outlook.com (10.152.19.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5186.14 via Frontend Transport; Fri, 22 Apr 2022 13:25:34 +0000 Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.27; Fri, 22 Apr 2022 13:25:22 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.27; Fri, 22 Apr 2022 13:25:21 +0000 Received: from e129171.cambridge.arm.com (10.2.80.38) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2308.27 via Frontend Transport; Fri, 22 Apr 2022 13:25:22 +0000 From: Luis Machado To: CC: , , Subject: [PATCH, v2] Fix 32-bit build for --enable-targets=all Date: Fri, 22 Apr 2022 14:25:13 +0100 Message-ID: <20220422132513.22471-1-luis.machado@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: 24765aac-536c-4d30-fade-08da24639aea X-MS-TrafficTypeDiagnostic: AS8PR08MB5991:EE_|DB5EUR03FT044:EE_|DBBPR08MB4902:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: onSgfhQIHDBeKvhEwiF2BG7bWb1DBm8BjCg4xgOpLIh9TFQGoRzEhrDyAy3BLFnocjK0nl0FmNFBv1yC5CV4aox9EO/ZA2EMomA8iFax6IHwIq0QKK3TaMKUvZImc3pWEB58JGt+38NC9E240iaPARcDj8jyZNSbWmc5M6lR9NVF9CVIm6i1Es8Oc0qA/+QvwZOOWnmwVsvuTaiJ/RSHwe0IDRKSRDZwGmyGvqZFgbTCWGAaFiF0bfXNJ1FZU0QhHCecDRFRH1C5lMB4Fgu1QLLd6sdMP6S2PffJBo+Aptj5mYLa52KhCBL5k+dAEF3VCXoqqQJ1mqdfSIj9giYNMrQ9z/KNA591VoEaFSgOBZs7VQTNVrf8/MnzamKPsuI8CVVs3ZvkfZw9ZE/bvyggwVbhHcaNifCf2N16mwuWXfOI1I5iGNFuIEnOfQoJzTbBOI4Hfz/8e2LkRjuWGTpn8lq2evqCNpnwtzjRjjXKBGlTRTYqJNeeWsFG1Kd7LmiSkORScFgglsc49rBZ8TWVsDj2UZragsy6BAofCWltjg8Ao4zpLlBAgLK/pjKgEC5SgDDsxsXzChnx97HPaC5PDrB8NJhxRKpUyr2RyKO0yVDAWu3p0mR/dDIPR0Chr0W2AQf4eyJe835fle+/XIDHV5mPRofeQSrKybELBhgIsulFcy61PffLJVtV/JJbBF4q4yddEgM3yb/AITjAzHdyDA== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230001)(4636009)(46966006)(36840700001)(40470700004)(508600001)(81166007)(5660300002)(82310400005)(2616005)(356005)(83380400001)(44832011)(70206006)(4326008)(2906002)(8936002)(70586007)(6666004)(8676002)(36860700001)(86362001)(7696005)(6916009)(54906003)(186003)(36756003)(26005)(1076003)(316002)(336012)(426003)(47076005)(40460700003)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB5991 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT044.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 00dc8b96-a444-4feb-9495-08da246394e2 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eDYEROPXuF0r/L6ipQu6KgTFryPtiC24TkhxOsv3Gpbrlk6iWYaFnP8wMZ1QoYFbacyBSNdYCQxYOm8AJhvKE7KPzf5DbqB7RTaDfaqKvHfwsxj3+atkfk9hZRm9JrW+SRpIaawGnO4K2eHuvru4y0wNRFO9S8LHTXiEK1Zuu2XBAcdx+ZBHf/eDLRB6etIQ5ozWUciWqk1eGtixNWrKuSkfQeonY7BJKdQqt5iMObyY8ZMh4RLuNeCczBggXwHeZp8OrA5gYJk0UPvlZ8yfiRUcD6vUwKlzvne1kThsGk9aOwRhD7iOFl1d7uRy2WkzdNuIfYTKTUC+FbWG2EBZNQMYn8L7gLsrJJM6KcKE82yVW5P5fxTckypKUPvCf/eF59v+fCP1IH5g4ljpGMHQ1O++sbRZ6wpnps5v+pEcnD51iahSHNJyyKtPgWjAO4zeeLlC0SCocmcSWYjvyTaC2KNHWWCAoZze/5QDvexdZHV1a/Yxi/RKojzWeYEbzKMvAdz9QbRqHMleBoSAU+zb9idXMjWUFrwEbb4wS2qCXND/LILWngN1pxLa6jWTt4PULUTLGGd6akeTLEKGTibC4PtZM2p/PiL7tB/OTb+6R6ukiVEvJkn0jMw1u44yA94L1PdZB766ihE27YWs7D16PRnN29swuMHOUIOPLyxcHQ1hbrXPAqxYg14SKFKzrJbJ X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(46966006)(40470700004)(2616005)(44832011)(4326008)(70206006)(81166007)(70586007)(82310400005)(6666004)(8676002)(36756003)(2906002)(40460700003)(8936002)(5660300002)(6916009)(426003)(336012)(86362001)(316002)(47076005)(54906003)(83380400001)(36860700001)(186003)(7696005)(107886003)(1076003)(508600001)(26005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2022 13:25:44.5643 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 24765aac-536c-4d30-fade-08da24639aea X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT044.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB4902 X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2022 13:25:49 -0000 v2: - Enable disassembler support for bpf, cris, loongarch and tilegx for 32-bit BFD. This prevents crashes when GDB tries to find a disassembler for these architectures and runs into a null pointer. -- The following fixes the GDB build for 32-bit (tested on 32-bit arm) for the following combinations: * --enable-targets=all --disable-sim * --enable-targets=all Previously I was seeing failures of this kind: binutils-gdb-armhf-bionic/sim/bpf/../../../../repos/binutils-gdb/sim/bpf/../common/sim-close.c:43: undefined reference to `bpf_cgen_cpu_close` binutils-gdb-armhf-bionic/sim/bpf/../../../../repos/binutils-gdb/sim/bpf/sim-if.c:166: undefined reference to `bpf_cgen_cpu_open_1` binutils-gdb-armhf-bionic/sim/bpf/../../../../repos/binutils-gdb/sim/bpf/sim-if.c:179: undefined reference to `bpf_cgen_init_dis` This particular combination of switches has not been tested for 32-bit hosts in a while (since November/December 2021), so there might be bugs that we need to address. The patch makes things build cleanly though. Tested on aarch64-linux Ubuntu 20.04 and armhf-linux-gnueabi Ubuntu 18.04. It would be nice to exercise this on other 32-bit targets, and get this included in time for GDB 12. --- opcodes/Makefile.am | 10 ++++++++++ opcodes/Makefile.in | 10 ++++++++++ opcodes/disassemble.c | 4 ++++ 3 files changed, 24 insertions(+) diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am index afd19fa7785..681fbc07584 100644 --- a/opcodes/Makefile.am +++ b/opcodes/Makefile.am @@ -124,6 +124,11 @@ TARGET32_LIBOPCODES_CFILES = \ arm-dis.c \ avr-dis.c \ bfin-dis.c \ + bpf-asm.c \ + bpf-desc.c \ + bpf-dis.c \ + bpf-ibld.c \ + bpf-opc.c \ cgen-asm.c \ cgen-bitset.c \ cgen-dis.c \ @@ -178,6 +183,9 @@ TARGET32_LIBOPCODES_CFILES = \ lm32-ibld.c \ lm32-opc.c \ lm32-opinst.c \ + loongarch-opc.c \ + loongarch-dis.c \ + loongarch-coder.c \ m10200-dis.c \ m10200-opc.c \ m10300-dis.c \ @@ -234,6 +242,8 @@ TARGET32_LIBOPCODES_CFILES = \ ppc-opc.c \ pru-dis.c \ pru-opc.c \ + riscv-dis.c \ + riscv-opc.c \ rl78-decode.c \ rl78-dis.c \ rx-decode.c \ diff --git a/opcodes/Makefile.in b/opcodes/Makefile.in index 3ab8bfb0548..d3eee49b169 100644 --- a/opcodes/Makefile.in +++ b/opcodes/Makefile.in @@ -516,6 +516,11 @@ TARGET32_LIBOPCODES_CFILES = \ arm-dis.c \ avr-dis.c \ bfin-dis.c \ + bpf-asm.c \ + bpf-desc.c \ + bpf-dis.c \ + bpf-ibld.c \ + bpf-opc.c \ cgen-asm.c \ cgen-bitset.c \ cgen-dis.c \ @@ -570,6 +575,9 @@ TARGET32_LIBOPCODES_CFILES = \ lm32-ibld.c \ lm32-opc.c \ lm32-opinst.c \ + loongarch-opc.c \ + loongarch-dis.c \ + loongarch-coder.c \ m10200-dis.c \ m10200-opc.c \ m10300-dis.c \ @@ -626,6 +634,8 @@ TARGET32_LIBOPCODES_CFILES = \ ppc-opc.c \ pru-dis.c \ pru-opc.c \ + riscv-dis.c \ + riscv-opc.c \ rl78-decode.c \ rl78-dis.c \ rx-decode.c \ diff --git a/opcodes/disassemble.c b/opcodes/disassemble.c index bd1b90b3956..7228df40ec0 100644 --- a/opcodes/disassemble.c +++ b/opcodes/disassemble.c @@ -42,7 +42,9 @@ #define ARCH_arm #define ARCH_avr #define ARCH_bfin +#define ARCH_bpf #define ARCH_cr16 +#define ARCH_cris #define ARCH_crx #define ARCH_csky #define ARCH_d10v @@ -58,6 +60,7 @@ #define ARCH_ip2k #define ARCH_iq2000 #define ARCH_lm32 +#define ARCH_loongarch #define ARCH_m32c #define ARCH_m32r #define ARCH_m68hc11 @@ -92,6 +95,7 @@ #define ARCH_tic4x #define ARCH_tic54x #define ARCH_tic6x +#define ARCH_tilegx #define ARCH_tilepro #define ARCH_v850 #define ARCH_vax -- 2.25.1