From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id ED9591F9F4 for ; Thu, 18 Nov 2021 15:39:01 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1145D3857C6F for ; Thu, 18 Nov 2021 15:39:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1145D3857C6F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1637249941; bh=zz+JDHMk51/+fScVK6qJjTQ2KmiEqdBNLZS9DEuKvNA=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=rDAt5AZablUjwSMmt1l81NEdI1wsZaT66UfAc6yg5S9SpW1RdW+LUtdONbb+Idhqh WdyMES/BRlHuZxEAFJ8EUNsupHIJ2+wMMAZd+Zh9jcWdk3mhCkQt7/mtco2ULlb6L6 W51qnfmRSZt6GLtLBxkn27sTi5Y7PAWkR/EfXfAY= 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 To: Florian Weimer Subject: Re: [PATCH 3/3] elf: Add _dl_find_eh_frame function Message-ID: <20211118153726.GF2646553@tucnak> 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-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: , From: Jakub Jelinek via Libc-alpha Reply-To: Jakub Jelinek Cc: gcc-patches@gcc.gnu.org, libc-alpha@sourceware.org, Jason Merrill Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" 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