From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by sourceware.org (Postfix) with ESMTP id 8FF0E3858D20; Fri, 11 Aug 2023 17:43:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8FF0E3858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=orcam.me.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=orcam.me.uk Received: by angie.orcam.me.uk (Postfix, from userid 500) id CB4149200C1; Fri, 11 Aug 2023 19:43:01 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id C41E99200BB; Fri, 11 Aug 2023 18:43:01 +0100 (BST) Date: Fri, 11 Aug 2023 18:43:01 +0100 (BST) From: "Maciej W. Rozycki" To: Florian Weimer cc: Richard Sandiford , Ying Huang , libc-alpha , yunqiang.su@oss.cipunited.com, binutils@sourceware.org Subject: Re: [PATCH v7] MIPS: Sync elf.h from binutils In-Reply-To: <87il9oywuh.fsf@oldenburg.str.redhat.com> Message-ID: References: <20230807020524.2031213-1-ying.huang@oss.cipunited.com> <87leemerwd.fsf@oldenburg.str.redhat.com> <4d3d1518-364c-8374-9d3d-86d1afe25d62@oss.cipunited.com> <87r0odeust.fsf@oldenburg.str.redhat.com> <3d7f6d51-7d7f-cc7c-31b9-744dc06010fa@oss.cipunited.com> <87cyzxfugb.fsf@oldenburg.str.redhat.com> <87il9oywuh.fsf@oldenburg.str.redhat.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-3488.6 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_INFOUSMEBIZ,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 List-Id: Hi Florian, Cc-ing binutils now, to get a record of this discussion there. > > The EF_* definitions were added on top of preexisting E_* macros back in > > 1998 by Ulrich Drepper with commit c3966b88eeb ("Update.") and only this: > > > > * elf/elf.h: Add lots of new symbols from Irix and Solaris. > > My concern was adding EF_* constants to glibc that duplicate E_* > constants that are used in binutils. I think we should either change > binutils to use the EF_* constants, too, or for these legacy constants, > use the E_* prefix in glibc as well. It's not a problem: as long as we reach consensus I can update binutils accordingly, and we can discard E_* constants from there at any time if needed as they are for BFD use only and we don't offer any stable BFD API. > Not sure if this a reasonable position, though. So I did a little more research on this topic and came across this thread of mine from decades ago, and specifically this message coming from the lost world: . Clearly IRIX used to use EF_* macros, just as I thought and just as has used the Linux kernel (and MTI never came to finishing their promised psABI spec, where it only says "To be supplied" in the relevant part[1]). So while we may have to keep the few already existing in , just because we were unfortunate enough to make them a part of our API back in 1996: * elf/elf.h: Add some new constants from recent Cygnus ELF header files. having likely taken them as a Cygnus invention without due consideration, I think we ought to refrain from adding new E_* macros and stick to EF_* instead. NB the whole thread referred above might be worth reviewing for anyone interested in these matters. Here's a reference for the earlier part: as the discussion started on the old MIPS/Linux mailing lists first and then was carried over to binutils as well. References: [1] "MIPS ABIs Described", MIPS Technologies, Inc., Document Number: MD00305, Revision 1.3, 2002/12/02, Chapter 7. "ELF object code", p. 24 Maciej