From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25403 invoked by alias); 4 Jan 2017 02:09:25 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 25359 invoked by uid 89); 4 Jan 2017 02:09:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=sk:bfd_mac, remind, H*Ad:U*macro X-Spam-User: qpsmtpd, 2 recipients X-HELO: cvs.linux-mips.org Received: from eddie.linux-mips.org (HELO cvs.linux-mips.org) (148.251.95.138) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 04 Jan 2017 02:09:19 +0000 Received: from localhost.localdomain ([127.0.0.1]:35158 "EHLO localhost.localdomain" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23992029AbdADCJRWeGoW (ORCPT + 1 other); Wed, 4 Jan 2017 03:09:17 +0100 Date: Wed, 04 Jan 2017 02:09:00 -0000 From: "Maciej W. Rozycki" To: John Baldwin cc: "Maciej W. Rozycki" , gdb-patches@sourceware.org, binutils@sourceware.org Subject: Re: [PATCH v3 1/3] Use bfd_mach_mips4000 as the default machine type for 64-bit MIPS ABIs. In-Reply-To: <20170103184341.58346-2-jhb@FreeBSD.org> Message-ID: References: <20170103184341.58346-1-jhb@FreeBSD.org> <20170103184341.58346-2-jhb@FreeBSD.org> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00040.txt.bz2 On Tue, 3 Jan 2017, John Baldwin wrote: > If the flags word of an ELF header is empty, _bfd_elf_mips_mach always > returned bfd_mach_mips3000 which is a 32-bit MIPS ABI. This change > uses bfd_mach_mips4000 if the ELF class identifies a 64-bit binary. Since this touches the MIPS port I'll have a look at it in details when I am back next week. In particular I'm a bit concerned about the inconsistency between n64 and n32 it introduces by making one default to `bfd_mach_mips4000' but not the other, while both are 64-bit ABIs requiring a 64-bit processor to run. Which is also already known at the time `_bfd_elf_mips_mach' is being called. So rather than changing its API entirely perhaps we just need an extra `need_64bit' or suchlike extra argument for the callee to select the BFD appropriately if the ISA is set incorrectly in the ELF object. Also can you please remind me why this is the case in the first place and how exactly such ELF objects are annotated, e.g. can we identify (limit the handling of) such faulty objects with the EI_OSABI marker for example? NB this should be explained in details for posterity in the commit message itself. Thanks, Maciej