From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by sourceware.org (Postfix) with ESMTPS id 07C933858C3A for ; Mon, 20 May 2024 01:46:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 07C933858C3A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 07C933858C3A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::634 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716169618; cv=none; b=sGLTulT1C6+4/mS9yXURkvXCpBVkcSPd9AeA5wsKBvV4j3Xfcv3xhYH9YdJdK0n583v6AxFwBkRHySCcRH8qoOC0ytOKJASVhbPtUokZM7sPWpgcCKAV6i0iJkVmw3kHyeJrzWc0K1KjtmjVIboK8trh4111P9jGJnCa3xFDpCM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716169618; c=relaxed/simple; bh=VEl802Bzuu2jOO2S/ZXxQ2gZ5Rep4PmDRe+MmfcgDjk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=r/u/kVI2UMhZFK8Z+DD0O1HtXuU24YcKbZJQcQgpY7YqpIUk2eu4tTGR1KrXBx7W5HVK6uL34yuxp26qmAzLAwfqa8N3x+fRJs8Hm6cOMuY/ItfxW7GXpfS/Scm2Spe+5Yd2Xol6PJ1t60Ehtbuss0PahlcyWoOvUkFw5irmPRE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1ec41d82b8bso69643105ad.2 for ; Sun, 19 May 2024 18:46:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716169616; x=1716774416; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=xoJUx5hcy8YUlMR8Eo9ljysPxtjIXjGQ4zIdg3FUFC0=; b=HOuZxcYH9tuXRu1XUJ/7q/r/LaeE3NKc8Q9mjlGce1mmY1rRxpH0WEOzJXqqr83//W W8jyueBJ1Bnf2MRVcsm1nRbK7jPuKKxN3ueRImcuIg8Ra1E+XWeASWURG2Wy86iopsiQ 4T5vKK2yEFF6rSI8VNHTyD+m7z4KUMALcbG2woGtUK7GaO0ZG1N62CUBcxiAmzRJFhWD ms02aD08TrmQkERVRDl+tRZ8egcY9nwek8GDWPmAlM6N+pqW5Hd+1ocSfOYXvcCU9ZNG 3Y3+AnNJ5Wup0xv1SvnCvR3nNvg8M6mINj2K5cHhoFD9UcRBrbKA+u6IiuPHWbjX38mg psOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716169616; x=1716774416; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xoJUx5hcy8YUlMR8Eo9ljysPxtjIXjGQ4zIdg3FUFC0=; b=ZM4QF1LASc7eIURjO8EL1BUg5hr1inZjfTaEVRc6xWSc7fEUF1U1IvRnTRiUlybLi8 zKZ7F2idQH+cihupstTk0cuqJyGedkTS/zJFA1uoNXRExH+VpQbndFAWXpaqCn+4sT+2 WLAtnxUhzyInNX7wlJkCf42jFGd+miEcQg6Y7fdRh4hQ6+XDWryUvzYmsrusxEQ/qzap GRUtfEvFH/L1Ngayxvxfpht1BtlIvySrG/YDJJHdG55f/JaItN3uuNxrnrfb5RZuz0G4 96ktp2rTBDZ3FcbGJOvAFsNpZ73Yx4bBbOdSK21AuSy2MY0My3ZtoEfTTJ+8SgFBpPFv G7Zw== X-Gm-Message-State: AOJu0YxoTSbxUnXZqeut/QYBzmSNVMQoU1KnwR1wea4YPoyfeC5Agoq5 qOIB70Cjok7zAMxIWfv3NGSf+T2sVy6c8mcYPhSf3WHwvwpQ5psPMmVw0A== X-Google-Smtp-Source: AGHT+IF99z7mCn0B8i2RHHXiSfUd0/zHATPiZcHAolHiSvUmv9GctEXfp9HeD+RhdO4LuyCtf5PVtQ== X-Received: by 2002:a17:903:2d1:b0:1f2:e14b:3d91 with SMTP id d9443c01a7336-1f2e14b3fc6mr105961535ad.59.1716169615626; Sun, 19 May 2024 18:46:55 -0700 (PDT) Received: from gnu-cfl-3.localdomain ([172.56.168.158]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f096da40a4sm79450655ad.66.2024.05.19.18.46.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 May 2024 18:46:55 -0700 (PDT) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id F136F74045C for ; Sun, 19 May 2024 18:46:53 -0700 (PDT) From: "H.J. Lu" To: libc-alpha@sourceware.org Subject: [PATCH] Define write_profiling functions only in profile library [BZ #31756] Date: Sun, 19 May 2024 18:46:53 -0700 Message-ID: <20240520014653.3219528-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3022.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 List-Id: libc.so doesn't use nor export write_profiling functions. There is no point to define them in libc.so nor in libc.a. Fix BZ #31756 by defining them only in profile library. Signed-off-by: H.J. Lu --- gmon/gmon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gmon/gmon.c b/gmon/gmon.c index 6439ed1caa..996b6a62a4 100644 --- a/gmon/gmon.c +++ b/gmon/gmon.c @@ -439,6 +439,7 @@ write_gmon (void) } +#ifdef PROF void __write_profiling (void) { @@ -448,7 +449,7 @@ __write_profiling (void) write_gmon (); _gmonparam.state = save; } -#ifndef SHARED + /* This symbol isn't used anywhere in the DSO and it is not exported. This would normally mean it should be removed to get the same API in static libraries. But since profiling is special in static libs -- 2.45.1