From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115292 invoked by alias); 6 Jan 2020 23:22:15 -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 115284 invoked by uid 89); 6 Jan 2020 23:22:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-HELO:sk:mail-io X-HELO: mail-io1-f68.google.com Received: from mail-io1-f68.google.com (HELO mail-io1-f68.google.com) (209.85.166.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 06 Jan 2020 23:22:13 +0000 Received: by mail-io1-f68.google.com with SMTP id x1so50570439iop.7 for ; Mon, 06 Jan 2020 15:22:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o7d6hys+LfrpWPuBySG4+Y0TraHdUVgeWjjNK52lXic=; b=tcDZevTBlWcZwC2//GR9GMP76zGguyhydDl2Bu+qdoNH8jqxElcLlTPlE8XBjSTTZX 4y1CM5fIuZZBtfd7Qv3gnx6Rz+xxD8GBw4MpUTGG9JHkR/VdZB2N0mzxOZ9wQfs4VyIH Y408xmTyLyDiD5HucTHymChd9EPA1YKWmFKV+GC8/2yfNXheVx60uvzW90fW95+YYvWE u/Wt6Q0vc3GYFgIc7KXtO0k2RYw7A9qxEH3Lf9dVpLFF7iKXvwMpo59eWu/SOfEJkW2k ubA9SK6+fOeqZtg0FjweA8KluIZbsddJbLn+gRTeXy48zlNKUlkRLikqKmXyMc5wd8at rYRQ== MIME-Version: 1.0 References: <20200104202004.83439-1-nolange79@gmail.com> <20200104202004.83439-2-nolange79@gmail.com> <87woa4po0q.fsf@tromey.com> In-Reply-To: <87woa4po0q.fsf@tromey.com> From: Norbert Lange Date: Mon, 06 Jan 2020 23:22:00 -0000 Message-ID: Subject: Re: [PATCH] always export the symbols for the proc_service interface To: Tom Tromey Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2020-01/txt/msg00137.txt.bz2 Am Mo., 6. Jan. 2020 um 17:07 Uhr schrieb Tom Tromey : > > >>>>> "Norbert" == Norbert Lange writes: > > Norbert> Compiling GDB with '-fvisibility=hidden' will remove the > Norbert> symbols that should be exported. > Norbert> This patch explicitly marks them as visible. > > Norbert> gdb/ChangeLog > > Norbert> PR build/24805 > Norbert> * gdbsupport/gdb_proc_service.h: push/pop visibility > Norbert> attribute for exported functions. > > Thanks for the patch. > > I have one question and one comment. > > Norbert> +++ b/gdb/gdbsupport/gdb_proc_service.h > Norbert> @@ -23,6 +23,11 @@ > > Norbert> #ifdef HAVE_PROC_SERVICE_H > > Norbert> +/* ensure the symbols are public, even if the default is hidden */ > > In the gdb style, comments should be complete sentences, which end in a > period followed by 2 spaces. So this should read: > > /* Ensure the symbols are public, even if the default is hidden. */ Noted, am I required to redo the patch if that's the only change? > > Norbert> +#if __GNUC__ >= 4 > Norbert> +#pragma GCC visibility pop > Norbert> +#endif > > Would it be better to just have this done a single time at the top and > bottom of the file? there are other headers included in between, so that's a bad idea (and you could do attach function attributes instead for the second case, see patch in bug report.) I still dont get why the external header is supported at all, if the implementation needs to match 100% anyway (unlike where you just call functions from a header). Norbert