From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id D20903857C66 for ; Thu, 18 Nov 2021 15:37:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D20903857C66 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-558-5VapExttMtS0bA5pcUXApQ-1; Thu, 18 Nov 2021 10:37:35 -0500 X-MC-Unique: 5VapExttMtS0bA5pcUXApQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 66FE7E744; Thu, 18 Nov 2021 15:37:34 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.54]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F21BA5F4F4; Thu, 18 Nov 2021 15:37:30 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 1AIFbRrO2647982 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 18 Nov 2021 16:37:27 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 1AIFbRRI2647981; Thu, 18 Nov 2021 16:37:27 +0100 Date: Thu, 18 Nov 2021 16:37:26 +0100 From: Jakub Jelinek To: Florian Weimer Cc: libc-alpha@sourceware.org, gcc-patches@gcc.gnu.org, Jason Merrill Subject: Re: [PATCH 3/3] elf: Add _dl_find_eh_frame function Message-ID: <20211118153726.GF2646553@tucnak> Reply-To: Jakub Jelinek References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=unavailable autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2021 15:37:40 -0000 On Wed, Nov 03, 2021 at 05:28:02PM +0100, Florian Weimer wrote: > --- /dev/null > +++ b/bits/dlfcn_eh_frame.h > @@ -0,0 +1,33 @@ > +/* System dependent definitions for find unwind information using ld.so. > + Copyright (C) 2021 Free Software Foundation, Inc. > + This file is part of the GNU C Library. > + > + The GNU C Library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Lesser General Public > + License as published by the Free Software Foundation; either > + version 2.1 of the License, or (at your option) any later version. > + > + The GNU C Library is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + Lesser General Public License for more details. > + > + You should have received a copy of the GNU Lesser General Public > + License along with the GNU C Library; if not, see > + . */ > + > +#ifndef _DLFCN_H > +# error "Never use directly; include instead." > +#endif > + > +/* This implementation does not use a DBASE pointer argument in > + _dl_find_eh_frame. */ > +#define DL_FIND_EH_FRAME_DBASE 0 > + > +__BEGIN_DECLS > +/* If PC points into an object that has a PT_GNU_EH_FRAME segment, > + return the pointer to the start of that segment in memory. If no > + corresponding object exists or the object has no such segment, > + returns NULL. */ > +void *_dl_find_eh_frame (void *__pc) __THROW; > +__END_DECLS dl_iterate_phdr is declared in link.h and without the _ prefix, shouldn't dl_find_eh_frame follow the suit and be declared in the same header and also without the prefix? Also, shouldn't the DL_FIND_EH_FRAME_DBASE macro on the other side have __ prefix? We have one DL_* macro, DL_CALL_FCT, so perhaps it is fine for -D_GNU_SOURCE, but various other projects do use macros with DL_* prefix, like boost or python. Jakub