From patchwork Wed Jan 10 15:50:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos O'Donell X-Patchwork-Id: 1885023 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=SrhQ3vD9; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T9C1y5zx3z1yPp for ; Thu, 11 Jan 2024 02:50:46 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A5B4C3860C2F for ; Wed, 10 Jan 2024 15:50:44 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id B5ED2385DC3D for ; Wed, 10 Jan 2024 15:50:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B5ED2385DC3D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B5ED2385DC3D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704901829; cv=none; b=HVfomx0SIDdUa2opYdcvh3fNe+DHtAz+NqsCT7orYUyXO1uMBeImCLpASjwiWryCYnvWxL0JASE1jR5/fBj7fzATaeiMn6uqJVvBHOEM/j4EFSQf10aIDvD8c2qog+QASswY4ORhTy7GsOHvDJoW8RiIAquTFbUGsSKjLqmLXTU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704901829; c=relaxed/simple; bh=XQJX9kATARs2k9H2U3wuuftNnX+APDAUrODH3wJt6X8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=JU5G+1SnqnSou1RR+eljiXjcV3c0D0G7KMtu6BfollRXCtH7qbHhm9c0852exwYAtoQ0v6g3QIjloe/Lb0kYCNSzPjCFEIIsKFpAh3/aOm2tBsDxZ3rRcwTZoiAgSXdMR64vasD236IeqOTSq2tDlmtXBR2TRV+3a3fC4y0wQow= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704901827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cFX0Y9njfb8NR5J9MGhGsVFUeV8h5f6JBNAz2qancT8=; b=SrhQ3vD9dVxnLrr/pe+1t2sfK4W7NxVs7zsje0mXFJ7F7JeD0Civv7k1c3IR8BQyqYmqBn gtX742xpuVa8VzSk5PdMNBdsZv4ij9/+IHwgVBRkl7QenB9yv0AmAqdc3OCdYX/yRuAvMq 7PwFgiCZoEpIbAlSQwxA0mgzo1Ux3+E= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-625-puHkgB1qPly2pHbISyJoxQ-1; Wed, 10 Jan 2024 10:50:26 -0500 X-MC-Unique: puHkgB1qPly2pHbISyJoxQ-1 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-680971002e3so78581926d6.0 for ; Wed, 10 Jan 2024 07:50:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704901824; x=1705506624; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cFX0Y9njfb8NR5J9MGhGsVFUeV8h5f6JBNAz2qancT8=; b=jB7Gry9MVZJ3u+RasGZWPCoHPBbcvmj6X6cVxMrWa+dj4MB0GhgEVY7nn8zjN3clcn ZXBWe8aE0Su4d5AjkY1ywFdTXnqfszz3tAOWukIu93GlAeQp6rylIybTIY/eRHs4tHf2 jPVYwZ5Gt9JZei27lz772m9J/pao/yKnHwd4i63qN1b9qI+FxjRpPZ08W6GeP7x+irWd jjmQgiZoqpoy4Wrf2emKSSBwIb8rwNj+Sj5rB860z9vEeIHMVLHa5SCeMk05MfIE4b6F 5LYGfqUFx15g6alKAGsjOqEl8iLwOXb7doS0FmiHxO2zdhcLxfla4XBu9Rtt4AQSovjd pfpg== X-Gm-Message-State: AOJu0YzEFDfu2ID0tCEhhmJVMfoUWXLhXg9ZvTRQAkwSjDp+SQJpw7TE 1n58Gt31rnDmuR+L4kQPDzijbSlCImFRqEWDJL5kHI0SF+KrPhVMHsilgOEvfgFIUur1wvhX41c FZLhN8hWwPU2N56Bx7upyAvKxm0PWF6VeNZPAJ9MMogIt/FhCsIIMZ7K8ChTKx4irkaCFzRD2r3 FbRCnU1sojZA== X-Received: by 2002:a05:6214:c8a:b0:67f:9c35:ada3 with SMTP id r10-20020a0562140c8a00b0067f9c35ada3mr358562qvr.59.1704901824316; Wed, 10 Jan 2024 07:50:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IGGPKcCyJjfHUuEYoD4EMiTEpKDNYkEONkgP/EPuPvmIYrZTsDB2gTkvllbmK10scPEQ/KDdA== X-Received: by 2002:a05:6214:c8a:b0:67f:9c35:ada3 with SMTP id r10-20020a0562140c8a00b0067f9c35ada3mr358550qvr.59.1704901824029; Wed, 10 Jan 2024 07:50:24 -0800 (PST) Received: from localhost.localdomain ([198.48.244.52]) by smtp.gmail.com with ESMTPSA id z17-20020a0cfc11000000b00680ca85b06fsm1790828qvo.31.2024.01.10.07.50.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 07:50:22 -0800 (PST) From: Carlos O'Donell To: libc-alpha@sourceware.org, fweimer@redhat.com Cc: Carlos O'Donell Subject: [PATCH] elf: Fix tst-nodeps2 test failure. Date: Wed, 10 Jan 2024 10:50:01 -0500 Message-ID: <20240110155011.3930473-1-carlos@redhat.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, URIBL_BLACK 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org When building the testsuite with --enable-hard-coded-path-in-tests the tst-nodeps2-mod.so is not built with the required DT_RUNPATH values and the test escapes the test framework and loads the system libraries and aborts. The fix is to use the existing $(link-test-modules-rpath-link) variable to set DT_RUNPATH correctly. No regressions on x86_64. Reviewed-by: Florian Weimer --- elf/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/elf/Makefile b/elf/Makefile index 600812e573..5d78b659ce 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -3022,6 +3022,8 @@ $(objpfx)tst-env-setuid: $(objpfx)tst-sonamemove-runmod2.so $(objpfx)tst-env-setuid-static.out: $(objpfx)tst-sonamemove-runmod1.so # The object tst-nodeps1-mod.so has no explicit dependencies on libc.so. +# We do not use $(link-test-modules-rpath-link) since the object has no +# DT_NEEDED. $(objpfx)tst-nodeps1-mod.so: $(objpfx)tst-nodeps1-mod.os $(LINK.o) -nostartfiles -nostdlib -shared -o $@ $^ tst-nodeps1.so-no-z-defs = yes @@ -3032,7 +3034,8 @@ $(objpfx)tst-nodeps1: $(objpfx)tst-nodeps1-mod.so # with the IFUNC resolver reference. $(objpfx)tst-nodeps2-mod.so: $(common-objpfx)libc.so \ $(objpfx)tst-nodeps1-mod.so $(objpfx)tst-nodeps2-mod.os - $(LINK.o) -Wl,--no-as-needed -nostartfiles -nostdlib -shared -o $@ $^ + $(LINK.o) -Wl,--no-as-needed -nostartfiles -nostdlib -shared -o $@ $^ \ + $(link-test-modules-rpath-link) $(objpfx)tst-nodeps2.out: \ $(objpfx)tst-nodeps1-mod.so $(objpfx)tst-nodeps2-mod.so