From patchwork Wed Aug 26 15:37:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 40325 Return-Path: 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 70E0B384BC17; Wed, 26 Aug 2020 15:47:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 70E0B384BC17 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1598456872; bh=J3h9sYhmOxgKRT7pIBpgX8XIXSDRwLqgHIzLGFgniHc=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=FY/Gs080I4kMeqhvlPBIAaVGQBA11RVk+ZoWDJHfZJhajWlZTeSn+ZESdVO+ua5KE LmTCcmQfETujHjYd876t1d7qEfufv+Z6e5r6rvG7WoiJg/074C5c+18UQVhVvBBb2d 6VQbgFhElQMb5lL5Jl5FEWCxZGDAuGSArVqbjfzk= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by sourceware.org (Postfix) with ESMTPS id 1C9BF38618A5 for ; Wed, 26 Aug 2020 15:47:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1C9BF38618A5 IronPort-SDR: wrUUP8IHpNF7D4RE/ElfgMkPOEuuludEFgQ2+HCnCdGlVQA7UR3HIubt2MOQ0sFeov6zBCDbcT zYHOYtpciHpaZLjTbtpKFs9+gbbOP5ViClG4TKJ62u1ftJx6qRmrM3O/MWB3rNStLDrE2CNjh4 KrMvniCLq2feMrBkCid8xYw44rJ0g/1HYdg5e5qE0zinLQBY50y4WT8tJGAKuuIMhXP98jVsn4 8+A6cEZ0kl/4iTH4zE0MKjnk7DQxYX+WKP/gG00nc1pJOxvNyOtf2OIn8xmBwjPdY+yODsPM15 IEg= X-IronPort-AV: E=Sophos;i="5.76,356,1592841600"; d="scan'208";a="147110000" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 26 Aug 2020 23:47:48 +0800 IronPort-SDR: r2d0Zdf5BMqpT8iirJhiJjj5S9xg9HPeVfMPcFdxsXMe1fvuw1ox9Chp3OQAZHXVd+zbwbh3SM 9Eay2K2tmvSQ== Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Aug 2020 08:35:22 -0700 IronPort-SDR: mOto5/HEKFFoDmvzT3625jtpcvhzm51Ms0XcAJYKt5CW6AIv/z5AR4doJQ01cbfQ8z/sGX/32N QAn0UuUIUJwg== WDCIronportException: Internal Received: from usa003387.ad.shared (HELO risc6-mainframe.hgst.com) ([10.86.59.162]) by uls-op-cesaip02.wdc.com with ESMTP; 26 Aug 2020 08:47:47 -0700 To: libc-alpha@sourceware.org Subject: [PATCH] elf/tst-libc_dlvsym: Add a TEST_COMPAT around some symbol tests Date: Wed, 26 Aug 2020 08:37:23 -0700 Message-Id: <20200826153723.1649036-1-alistair.francis@wdc.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alistair Francis via Libc-alpha From: Alistair Francis Reply-To: Alistair Francis Cc: alistair.francis@wdc.com Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" The _sys_errlist and _sys_siglist symbols are deprecated since 2.32. This patch adds a TEST_COMPAT check around the tests. This fixes test failures on new architecutres (such as RV32) that don't have this symbol defined. Signed-off-by: Alistair Francis Reviewed-by: Adhemerval Zanella --- elf/tst-libc_dlvsym.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/elf/tst-libc_dlvsym.h b/elf/tst-libc_dlvsym.h index 6b132dd7c3..4601e8869c 100644 --- a/elf/tst-libc_dlvsym.h +++ b/elf/tst-libc_dlvsym.h @@ -117,8 +117,12 @@ compare_vsyms (void) obtain an explicit handle for libc.so. */ void *libc_handle = xdlopen (LIBC_SO, RTLD_LAZY | RTLD_NOLOAD); + /* sys_errlist and sys_siglist were deprecated in glibc 2.32 and aren't + avaliable on newly linked binaries. */ +#if TEST_COMPAT (libc, GLIBC_2_0, GLIBC_2_32) compare_vsyms_1 (libc_handle, "_sys_errlist"); compare_vsyms_1 (libc_handle, "_sys_siglist"); +#endif compare_vsyms_1 (libc_handle, "quick_exit"); xdlclose (libc_handle);