From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25072 invoked by alias); 14 Jan 2020 15:47:35 -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 25060 invoked by uid 89); 14 Jan 2020 15:47:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=knew X-HELO: us-smtp-delivery-1.mimecast.com Received: from us-smtp-2.mimecast.com (HELO us-smtp-delivery-1.mimecast.com) (205.139.110.61) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 14 Jan 2020 15:47:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579016843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TkNG99RYVgUyklq1x+R/u7DSvdevkSy14x3IYUKddXk=; b=G8PX1+l2BRT/aJxDCLkKsPWeV7+1NMKIr5N72SPmxzqZW/kPcA8f5U3eJ28VTO+98OvPl2 OElgn7x4kCRJ0tS0vyySIKMchC3tPNn4lvl40W/fgzV2SZWsoqg/b6Ozj0Xxaz03R08sOF 6QW3L9t0QosbquQ+go+Wtaq1K7hV+94= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-220-UARB6e5vPESwOaisty6H7A-1; Tue, 14 Jan 2020 10:47:22 -0500 Received: by mail-wr1-f69.google.com with SMTP id f17so6655652wrt.19 for ; Tue, 14 Jan 2020 07:47:22 -0800 (PST) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:56ee:75ff:fe8d:232b? ([2001:8a0:f913:f700:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id 18sm18228293wmf.1.2020.01.14.07.47.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Jan 2020 07:47:20 -0800 (PST) Subject: Re: [PATCH][PR build/24805] Explicitly export symbols from gdb_proc_service To: Norbert Lange References: <20200104202004.83439-1-nolange79@gmail.com> <466b1cd0-ce93-15f2-6986-aae17cbee6cf@redhat.com> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <6cebf642-05a8-585f-2ec8-786d56820371@redhat.com> Date: Tue, 14 Jan 2020 16:28:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2020-01/txt/msg00377.txt.bz2 On 1/14/20 3:36 PM, Pedro Alves wrote: > On 1/6/20 11:39 PM, Norbert Lange wrote: >> Am Mo., 6. Jan. 2020 um 20:21 Uhr schrieb Pedro Alves : >>> >>> On 1/4/20 8:20 PM, Norbert Lange wrote: >>>> Compiling GDB with '-fvisibility=hidden' will remove the >>>> symbols that should be exported. >>>> This patch explicitly marks them as visible. >>> >>> Curious. We have gdb/proc-service.list supposedly for this, >>> doesn't -Wl,--dynamic-list work with -fvisibility=hidden then? >>> >> >> Obviously it doesn't, else I would not have spent time figuring out >> why libthread_db wont load. > > OK. Haven't looked at visibility issues in years. It also wasn't clear > to me whether the issue could be that -Wl,--dynamic-list wasn't used > in your build for some reason, maybe related to how you're configuring GDB. > >> -Wl,--dynamic-list merely filters the visible symbols, it does not see >> "hidden" ones. > > BTW, you didn't post an actual patch to the list: > https://sourceware.org/ml/gdb-patches/2020-01/msg00083.html I knew I must have been confused. I found your patch on the list, as a reply to that... > > I found it in bugzilla, though. > > How about something like this? It's similar to your #2 at > , but > I'm using typeof to avoid issues with different systems using > different prototypes. BTW, I forgot to mention why I suggested this as alternative to the push/pop approach. It was that the push/pop approach makes everything indirectly included by have default visibility too. I don't know whether that ends up being any function in practice, though. Thanks, Pedro Alves