Message ID | 20241031113500.3685068-1-andre.simoesdiasvieira@arm.com |
---|---|
Headers |
Return-Path: <binutils-bounces~patchwork=sourceware.org@sourceware.org> 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 303443857739 for <patchwork@sourceware.org>; Thu, 31 Oct 2024 11:35:55 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 52D2C3858D21 for <binutils@sourceware.org>; Thu, 31 Oct 2024 11:35:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 52D2C3858D21 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 52D2C3858D21 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730374519; cv=none; b=m7AQpOEejEExKpLh+TBhQ2yziuvYkEXECV1ina9ca8wsPpgrBITiz5TgLHSUbpM7afICCGpRXThDFKz/TNm21Se+tFbm/YvGfANK/qQD5IoWhZk58fGKbfl9PqC17hKUjXPUf8wm64NYgnjXRvHlJKTC0pA5+8u6gEYNkQBhfLc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730374519; c=relaxed/simple; bh=sgOhsHtRUmbO8VOWA9P2ur6Q25e+n/HR5SOdgKGD/iE=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=rU0/1d5ECUYbLTi1gBFsznu9JtYfs2yUTzkDhRBa1dNGaM/pgRqkTVPoLjILX3BmLuNdmTgUf7BTxcxilDzy8bGCq8DZlrNsurHdlak7oVFOWhKQxyNnPdjO8AtkILSQj12aC6cVP5dEXGYYJEAW1uByR8MOQeh3CNlYfC9jQmk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 978651063; Thu, 31 Oct 2024 04:35:47 -0700 (PDT) Received: from e107157-lin.cambridge.arm.com (e107157-lin.cambridge.arm.com [10.2.78.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1FEA43F73B; Thu, 31 Oct 2024 04:35:16 -0700 (PDT) From: Andre Vieira <andre.simoesdiasvieira@arm.com> To: binutils@sourceware.org Cc: richard.earnshaw@arm.com, Andre Vieira <andre.simoesdiasvieira@arm.com> Subject: [PATCH 0/2] arm, objdump: Make objdump use bfd's machine detection to drive disassembly Date: Thu, 31 Oct 2024 11:34:58 +0000 Message-Id: <20241031113500.3685068-1-andre.simoesdiasvieira@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no 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 <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org |
Series |
arm, objdump: Make objdump use bfd's machine detection to drive disassembly
|
|
Message
Andre Vieira (lists)
Oct. 31, 2024, 11:34 a.m. UTC
Hi, Let's try this again, my previous attempt to email this series failed somewhat... This patch series makes objdump use build attributes or notes if present to determine the architecture to disassembly for. This is a deviation from the existing behaviour where it would attempt to disassemble for all known A-profile instructions, which would lead to inaccuracies with earlier architectures and even wrong assembly when disassembling an Armv8.1-M Mainline object file/binary. The first patch does the bulk of the work and the second cleans up the 26-bit instruction disassembly to warn developers of obsolote behaviour. Tested series on gas for arm-none-eabi, arm-wince and arm-vxworks. Andre Vieira (2): arm, objdump: Make objdump use bfd's machine detection to drive disassembly arm, objdump: print obsolote warning when 26-bit set in instructions gas/testsuite/gas/arm/armv1.d | 8 ++-- gas/testsuite/gas/arm/inst.d | 32 +++++++-------- gas/testsuite/gas/arm/nops.d | 1 + gas/testsuite/gas/arm/pinsn.d | 24 ----------- gas/testsuite/gas/arm/pinsn.s | 16 -------- gas/testsuite/gas/arm/unpredictable.d | 1 + gas/testsuite/gas/arm/wince_inst.d | 32 +++++++-------- include/opcode/arm.h | 4 +- opcodes/arm-dis.c | 58 ++++++++++++++------------- 9 files changed, 70 insertions(+), 106 deletions(-) delete mode 100644 gas/testsuite/gas/arm/pinsn.d delete mode 100644 gas/testsuite/gas/arm/pinsn.s