From patchwork Fri Jan 28 22:08:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xi Ruoyao X-Patchwork-Id: 1585972 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=T/bYFDfm; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Jls6m1JKGz9t3b for ; Sat, 29 Jan 2022 09:08:48 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 41D093857C60 for ; Fri, 28 Jan 2022 22:08:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 41D093857C60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1643407725; bh=Mujdme6tt6ZDU9MJSH8xYMU2UrFv1OSHh+TrVfuGRvw=; h=Subject:To:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=T/bYFDfmgmwZWg7xOmpjSwXrY5hEspRlHFeuco/IRc1W09cSbOoA3MrVwA0oRCMf+ RWsf6t0nkG6swsHUeFrlxfdNssV5GKSERA8RlGsxVzY5aB3QDzkBxfc211smRPZ5J8 buhp1EKmDL+5kD8QdCFYdVAwm/8opgDVuGCGQQ28= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mengyan1223.wang (mengyan1223.wang [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 2621A385840C for ; Fri, 28 Jan 2022 22:08:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2621A385840C Received: from localhost.localdomain (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@mengyan1223.wang) by mengyan1223.wang (Postfix) with ESMTPSA id 0210865BC8; Fri, 28 Jan 2022 17:08:27 -0500 (EST) Message-ID: <0a20f5ff9eba19fcf874932315e21f4cb1c1be14.camel@mengyan1223.wang> Subject: [PATCH v3 3/3] elf: tst-dlmopen4: use target specific r_debug_offset function To: Carlos O'Donell , "H.J. Lu" , GNU C Library Date: Sat, 29 Jan 2022 06:08:25 +0800 In-Reply-To: <03e68d009c7a029270de44f2f2c4b7f3d787ddab.camel@mengyan1223.wang> References: <046da3ae8fc57687b5a9480381904d3f53b1010f.camel@mengyan1223.wang> <4a518e0d1c617e248074db7b0cd122d3c86bb058.camel@mengyan1223.wang> <03e68d009c7a029270de44f2f2c4b7f3d787ddab.camel@mengyan1223.wang> User-Agent: Evolution 3.42.3 MIME-Version: 1.0 X-Spam-Status: No, score=-3037.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, JMQ_SPF_NEUTRAL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Xi Ruoyao via Libc-alpha From: Xi Ruoyao Reply-To: Xi Ruoyao Cc: syq@debian.org, Jiaxun Yang , Joseph Myers , xry111@mengyan1223.wang Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" Fix the test failure on MIPS. --- elf/tst-dlmopen4.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/elf/tst-dlmopen4.c b/elf/tst-dlmopen4.c index d8bcf7e9d5..28e052f199 100644 --- a/elf/tst-dlmopen4.c +++ b/elf/tst-dlmopen4.c @@ -25,16 +25,10 @@ #include #include -#ifndef ELF_MACHINE_GET_R_DEBUG -# define ELF_MACHINE_GET_R_DEBUG(d) \ - (__extension__ ({ \ - struct r_debug_extended *debug; \ - if ((d)->d_tag == DT_DEBUG) \ - debug = (struct r_debug_extended *) (d)->d_un.d_ptr; \ - else \ - debug = NULL; \ - debug; })) -#endif +#define E(x) x +#define EW(x) ElfW(x) +#define R_DEBUG_IN_PROCESS +#include static int do_test (void) @@ -44,7 +38,7 @@ do_test (void) for (d = _DYNAMIC; d->d_tag != DT_NULL; ++d) { - debug = ELF_MACHINE_GET_R_DEBUG (d); + debug = (struct r_debug_extended *) r_debug_offset (d, 0, 0); if (debug != NULL) break; }