From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id DC411385840B for ; Fri, 28 Oct 2022 22:16:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DC411385840B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x631.google.com with SMTP id y4so6013416plb.2 for ; Fri, 28 Oct 2022 15:16:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=I+5tanFoN9ETW7K93jiJSlCqWEaa3saXDZX4RMUdDLU=; b=MNJhXzyc4buxn7ydx5UHzV0LTxebrfTun84wS/aKlYxWqVkCXF0CFPuLljw14Emy+l O3K8r1+lTAe8qY1L7jLHWyEdwMMBrtHizvdSOKRlfL3Y8cySYekVcVJ8rULCVo/P7Xxf 84vCOetTRd24Y2nzVwDjwBCW/j+tOWJSg2ax2GMXKdtrcF33tM+ifUeUSztjE4imeKrc +wy8rCJwlKkPVdEkhmclVpYIfYUgZMNSRf9F0MRkwvUGty+jnlKEw0Ov4i20jHYCBCXf TOos+n+Suyc0FfIzHkLxaHCH9sWkw2Gp2LJDiCFnE6RYzTmQ1Byptmn4/cpeyG3dSEgh i4bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=I+5tanFoN9ETW7K93jiJSlCqWEaa3saXDZX4RMUdDLU=; b=lwi3bLl2QQe5JDelfFdNdxUxbUsSJ7RKzu7JdtPnPtWRYXvIY7phMFgDiiwMWX3VRi lAhgHzlpdeSIsaef4gvQyKX+46c9rEvFRDf2NYkOzdb1kUj4Bq/zKMf8h9LdJfwXJKTE 3Y1hFbgxp1Y1qQqMg50Kw1v9TiAMGlsnNCHSkbnKiwzPClLs1611bZARQaJi6b3uUIc5 sTylbse994G9VM59PkHdir/ECSKakFk719axs3MpUpKKv94qBFZPb+omqg2URjLAxE8j RbZG5cdclLSqf7FPqYGBttiilB5I/Vl1MBbH/TNlDI+aA8wO+/w6bo+W/srgWAAM5pVo ZYSw== X-Gm-Message-State: ACrzQf0wFdP9zw/pWX7xuSzw/B/0P6mkG8O98vd5Bcs0rpq6FGvURABA Kd2iGwHs8QgnhQLRwN6DXj8JowmSOBI= X-Google-Smtp-Source: AMsMyM5a+fEfzZ290lUDrYJTas7ab1+9GioGXJ/SBQttvBnk1cqkrz+3vS/5RTSAopILt3GLpXb+Ag== X-Received: by 2002:a17:902:8693:b0:17a:f71:98fd with SMTP id g19-20020a170902869300b0017a0f7198fdmr1229474plo.25.1666995394782; Fri, 28 Oct 2022 15:16:34 -0700 (PDT) Received: from gnu-tgl-3.localdomain ([172.56.30.251]) by smtp.gmail.com with ESMTPSA id b5-20020a170902e94500b0017a09ebd1e2sm3465282pll.237.2022.10.28.15.16.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 15:16:33 -0700 (PDT) Received: from gnu-tgl-3.. (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 1250AC009D; Fri, 28 Oct 2022 15:16:32 -0700 (PDT) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: Carlos O'Donell Subject: [PATCH] elf: Build tst-relr-mod[34]a.so with $(LDFLAGS-rpath-ORIGIN) Date: Fri, 28 Oct 2022 15:16:32 -0700 Message-Id: <20221028221632.500817-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3026.4 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: When --enable-hardcoded-path-in-tests is used only with DT_RUNPATH, elf/tst-relr3 and elf/tst-relr4 failed to run. Their dependency libraries, tst-relr-mod3a.so and tst-relr-mod4a.so, are failed to load since DT_RUNPATH on executable doesn't apply to them. Build tst-relr-mod3a.so and tst-relr-mod4a.so with $(LDFLAGS-rpath-ORIGIN) to add DT_RUNPATH for their dependency libraries. --- elf/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elf/Makefile b/elf/Makefile index 86c960cf8a..5f7d222bb1 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -2872,7 +2872,7 @@ $(objpfx)tst-relr-mod3b.so: $(objpfx)tst-relr-mod3b.os $(objpfx)tst-relr-mod3a.so: $(objpfx)tst-relr-mod3a.os \ $(objpfx)tst-relr-mod3b.so $(LINK.o) -nostdlib -nostartfiles -Wl,-z,pack-relative-relocs \ - $(LDFLAGS-soname-fname) \ + $(LDFLAGS-soname-fname) $(LDFLAGS-rpath-ORIGIN) \ -shared -o $@.new $(filter-out $(map-file),$^) $(call after-link,$@.new) mv -f $@.new $@ @@ -2891,7 +2891,7 @@ $(objpfx)tst-relr-mod4b.so: $(objpfx)tst-relr-mod4b.os $(objpfx)tst-relr-mod4a.so: $(objpfx)tst-relr-mod4a.os \ $(objpfx)tst-relr-mod4b.so $(LINK.o) -nostdlib -nostartfiles -Wl,-z,pack-relative-relocs \ - $(LDFLAGS-soname-fname) \ + $(LDFLAGS-soname-fname) $(LDFLAGS-rpath-ORIGIN) \ -shared -o $@.new $(filter-out $(map-file),$^) $(call after-link,$@.new) mv -f $@.new $@ -- 2.37.3