public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Jonathan Wakely <jwakely@redhat.com>, Ian Lance Taylor <iant@golang.org>
Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org
Subject: Re: [PATCH] libstdc++: Update backtrace-rename.h
Date: Tue, 13 Dec 2022 10:59:38 +0100	[thread overview]
Message-ID: <Y5hNCuMMHqFZGJBp@tucnak> (raw)
In-Reply-To: <CACb0b4kYKxjFk1612fnSer3+YcduCmyah_7xzWNVzCkBTjgLKg@mail.gmail.com>

On Tue, Dec 13, 2022 at 09:50:23AM +0000, Jonathan Wakely via Gcc-patches wrote:
> On Tue, 13 Dec 2022 at 09:44, Jakub Jelinek <jakub@redhat.com> wrote:
> >
> > Hi!
> >
> > When writing the r13-4629 commit log I've realized that libsanitizer
> > isn't the only place which nowadays renames libbacktrace symbols,
> > libstdc++ does that too.
> >
> > Ok for trunk if this passes bootstrap/regtest?
> 
> OK, thanks.
> 
> When we move the backtrace symbols from libstdc++_libbacktrace.a into
> libstdc++.so we probably want to look into removing the symbols we
> don't actually use. Renaming them to our private namespace is good,
> but not including them in the library at all would be better.

Most of them I assume are actually used, the reason they aren't static
is that libbacktrace contains multiple TUs and some APIs are used to
interface between the TUs.  __attribute__((visibility ("hidden"))) would
work for shared libraries and targets where it actually works, but
we still have the *.a libraries where such symbols are visible, so I think
some renaming is needed.

Though, my understanding of backtrace_uncompress_{lzma,zdebug,zstd} is that
those are there just as small wrappers for make check purposes only,
so I bet those symbols could be easily removed (say by not defining them
at all if their names are macros, then we could keep them in
backtrace-rename.h as is).

> > 2022-12-13  Jakub Jelinek  <jakub@redhat.com>
> >
> >         * src/libbacktrace/backtrace-rename.h (backtrace_uncompress_zstd):
> >         Define.
> >
> > --- libstdc++-v3/src/libbacktrace/backtrace-rename.h.jj 2022-09-01 09:37:58.452624676 +0200
> > +++ libstdc++-v3/src/libbacktrace/backtrace-rename.h    2022-12-13 10:41:14.551699599 +0100
> > @@ -16,6 +16,7 @@
> >  #define backtrace_syminfo __glibcxx_backtrace_syminfo
> >  #define backtrace_uncompress_lzma __glibcxx_backtrace_uncompress_lzma
> >  #define backtrace_uncompress_zdebug __glibcxx_backtrace_uncompress_zdebug
> > +#define backtrace_uncompress_zstd __glibcxx_backtrace_uncompress_zstd
> >  #define backtrace_vector_finish __glibcxx_backtrace_vector_finish
> >  #define backtrace_vector_grow __glibcxx_backtrace_vector_grow
> >  #define backtrace_vector_release __glibcxx_backtrace_vector_release

	Jakub


      reply	other threads:[~2022-12-13  9:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13  9:44 Jakub Jelinek
2022-12-13  9:50 ` Jonathan Wakely
2022-12-13  9:59   ` Jakub Jelinek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y5hNCuMMHqFZGJBp@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iant@golang.org \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).