From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from arjuna.pair.com (arjuna.pair.com [209.68.5.131]) by sourceware.org (Postfix) with ESMTPS id C5715386F83D for ; Wed, 6 May 2020 18:50:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C5715386F83D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=bitrange.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=hp@bitrange.com Received: by arjuna.pair.com (Postfix, from userid 3006) id 8D1028A09A; Wed, 6 May 2020 14:50:44 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by arjuna.pair.com (Postfix) with ESMTP id 8C53E8A094; Wed, 6 May 2020 14:50:44 -0400 (EDT) Date: Wed, 6 May 2020 14:50:44 -0400 (EDT) From: Hans-Peter Nilsson X-X-Sender: hp@arjuna.pair.com To: Gunther Nikl cc: binutils , Nick Clifton Subject: Re: [PATCH] bfd: tweak SET_ARCH_MACH of aout-cris.c In-Reply-To: <20200506201046.00003c73@justmail.de> Message-ID: References: <20200421221210.00004ab7@justmail.de> <2061ab5a-c5c0-9f94-854f-298a622068aa@redhat.com> <20200506201046.00003c73@justmail.de> User-Agent: Alpine 2.20.16 (BSF 172 2016-09-29) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Wed, 06 May 2020 18:50:55 -0000 On Wed, 6 May 2020, Gunther Nikl wrote: > Hans-Peter Nilsson wrote: > > > > On Mon, 4 May 2020, Nick Clifton via Binutils wrote: > > > Hi Gunther, > > > > > > > 2020-04-XX Gunther Nikl > > > > > > > > * aout-cris.c (DEFAULT_ARCH): Delete define. > > > > (MY_set_arch_mach): Likewise. > > > > (SET_ARCH_MACH): Use bfd_set_arch_mach with an explicit > > > > architecture of bfd_arch_cris. > > > > (swap_ext_reloc_in): Add casts to r_index extraction. > > > > Mask valid bits of r_type before the shift. > > > > > > Approved and applied. > > > > Whoops, I missed this one, posted 2020-04-21. Thanks for taking > > care of it! > > I sent the mail to the list only since I knew you are reading the list. > I was unsure whether CCing you would be fine. I don't know of a maintainer that would see that as bad, but I guess it takes just one such experience... > I assumed that you would > notice a CRIS topic since its rather rare. That's reasonable thinking, mea culpa. > > Regarding the ensuing discussion, I have no recollection of the > > events around the conception :) other than I was possibly > > striving for consistency with other similar a.out-related files. > > IMO, its quite a challenge to understand all these clever macros > filling structure elements, calling functions that have to be named > correctly for other macros. Sometimes a function vector is called > directly by macro (using another macro ;), and sometimes its a real > function which then calls the function pointer. And the list goes on. Yeah, well that's bfd for you. :) > BTW, I didn't realize until recently that aoutx.h can be used outside > of aout32.c/aout64.c. However I was surprised to see that aout-cris.c > does include aout32.c directly. I guess that was a deliberate decision? I honestly can't remember. Doesn't it match the pattern of other aout-*.c files? ...hm, not many around. Oh wait: I think something was sufficiently different that I couldn't use aout32.c, perhaps the reloc format. > Anyway including aoutx.h in my custom backend avoided ugly changes to > aoutx.h itself. That was a surprising lesson. I think it's actually meant to be used that way, directly or via aout32.h/aout64.h. At least it says so in a comment. brgds, H-P