From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 78575 invoked by alias); 1 Oct 2018 07:08:53 -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 78545 invoked by uid 89); 1 Oct 2018 07:08:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HTo:U*nickc, HX-Received:Oct, HX-Received:Mon, 0100 X-HELO: mail-pf1-f193.google.com Received: from mail-pf1-f193.google.com (HELO mail-pf1-f193.google.com) (209.85.210.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 01 Oct 2018 07:08:50 +0000 Received: by mail-pf1-f193.google.com with SMTP id k19-v6so8528339pfi.1; Mon, 01 Oct 2018 00:08:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=s02+zPVURgPBHKjONMtdknTdOyjXLEGFIKQpZClRuEk=; b=eYxBEaHa883/5WCLWXIq+USOR3vhyxTwl03raYE/6/PmYBN8oUidjZutnM2h/AHbcq 6Tw5ek7oU4vRlBVF//okIBnSoMt7A/49hQ+ht21yX+RIxbghylS4fR/Qb+qhim/3vEEl nXpj5P87T6e/DKdnifOJOvQ3DG+yJcYvk08OoIK/2aTk7aE2aAzLN3LhFBALi9yXzgou /lQP48TwHdWbx2j0+qaMFA+jjTKq7E8Ex6RLOp5CmCnES/iMrxz8LzLQBsn6TDuQNiD2 4LzrdQoktu+8YtWgKm2Qidq2R2/ZX4eaE4KyuBtqSgOfQ6BcBA+BCXrnvbzcVAFWTxVC BvHA== Return-Path: Received: from localhost (g106.218-225-177.ppp.wakwak.ne.jp. [218.225.177.106]) by smtp.gmail.com with ESMTPSA id e7-v6sm20976341pfk.3.2018.10.01.00.08.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Oct 2018 00:08:48 -0700 (PDT) Date: Mon, 01 Oct 2018 07:08:00 -0000 From: Stafford Horne To: Nick Clifton Cc: Richard Henderson , binutils@sourceware.org, GDB patches , Openrisc Subject: Re: [PATCH 0/4] OpenRISC binutils updates and new relocs Message-ID: <20181001070846.GC3318@lianli.shorne-pla.net> References: <20180821143823.16985-1-shorne@gmail.com> <20180908213515.GN4594@lianli.shorne-pla.net> <20180918095234.GP4594@lianli.shorne-pla.net> <20b65fc3-5bbb-6e77-f598-4582204ee0e5@redhat.com> <20180927060756.GB3318@lianli.shorne-pla.net> <271e3bfa-4958-0387-9a82-ecfdb58f1e26@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <271e3bfa-4958-0387-9a82-ecfdb58f1e26@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg00003.txt.bz2 On Fri, Sep 28, 2018 at 04:39:03PM +0100, Nick Clifton wrote: > > > To produce these errors I need to change the code, Using abort we see: > > > > /home/shorne/work/gnu-toolchain/local/lib/gcc/or1k-elf/9.0.0/../../../../or1k-elf/bin/ld: \ > > BFD (GNU Binutils) 2.31.51.20180927 internal error, \ > > aborting at ../../binutils-gdb/bfd/elf32-or1k.c:1152 in or1k_final_link_relocate > [...] > Depending upon where you are in your code, if you have access to the link_info > structure you can use its einfo() routine instead of bfd_error_handler. This > has the advantage that it allows a %X formatting directive, which causes the > program to terminate with an error exit code. OK, thanks for the info. I tested it out using einfo(), it does exit with an error code, but it doesn't produce the line numbers and function name that abort() gives us. I am sure I could make it do it, but for now I will use the error message + abort() as it gives me what I would want to see in a bug report :). V2 of the patch should be coming up soon. -Stafford