Message ID | Y5hJdyuDW5yvCyz6@tucnak |
---|---|
State | Committed |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0796F384010E for <patchwork@sourceware.org>; Tue, 13 Dec 2022 09:44:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0796F384010E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1670924698; bh=7ePoG3mcrrSoYl7+erVOpRN09c8swCvn8Py9DbcAliA=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=xX6HygpgXxDt2k3gn3O2t0ND98YRaJRU1e6RM3IMjZHFOI8jeapGE8SqMkRjKGmHf cAZ/+QGwqycjlG6TYSqhOoCDtuMCocvTrmNz2Xs4wwEr4X4mpvXyF2vhxcPG51J2Mg 6L26NKhcSs3p10NLsT6mGifFEeBVpNENNj/lACVQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 77FC7385B18D for <gcc-patches@gcc.gnu.org>; Tue, 13 Dec 2022 09:44:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 77FC7385B18D Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-38-b_HL4gXUNlC4iQ-DzW8h5A-1; Tue, 13 Dec 2022 04:44:28 -0500 X-MC-Unique: b_HL4gXUNlC4iQ-DzW8h5A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 789E9101E14E; Tue, 13 Dec 2022 09:44:28 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.195.114]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 31152C15BA0; Tue, 13 Dec 2022 09:44:28 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 2BD9iNDl1939411 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 13 Dec 2022 10:44:24 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 2BD9iNet1939410; Tue, 13 Dec 2022 10:44:23 +0100 Date: Tue, 13 Dec 2022 10:44:23 +0100 To: Jonathan Wakely <jwakely@redhat.com> Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: [PATCH] libstdc++: Update backtrace-rename.h Message-ID: <Y5hJdyuDW5yvCyz6@tucnak> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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=-3.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Jakub Jelinek via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Jakub Jelinek <jakub@redhat.com> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
libstdc++: Update backtrace-rename.h
|
|
Commit Message
Jakub Jelinek
Dec. 13, 2022, 9:44 a.m. UTC
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? 2022-12-13 Jakub Jelinek <jakub@redhat.com> * src/libbacktrace/backtrace-rename.h (backtrace_uncompress_zstd): Define. Jakub
Comments
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. > 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 >
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
--- 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