From patchwork Mon Aug 7 17:26:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 132289 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp1599357vqr; Mon, 7 Aug 2023 10:26:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEyMQH7o490yY52JbzQtfq12HTwVoJcmoZPYu6512V29ky9MRWqUGVWL7uwZHeWedot4iOf X-Received: by 2002:a05:6402:b09:b0:522:1d9e:221 with SMTP id bm9-20020a0564020b0900b005221d9e0221mr8392230edb.38.1691429177565; Mon, 07 Aug 2023 10:26:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691429177; cv=none; d=google.com; s=arc-20160816; b=F4ojByjv3UfKlGh7wof2t3vX7nV2LJR2vnkZGxNLSvP8PAEHzeuGMavygQ9v/Dgqq6 ro9hWqYM+HO/eFBEpoxOYMiSuGwAAid00E9I2aWlEljYDO4m7nKNHB7bYfH31tOY6Qsl 5xkO2TbvHL/T7muFYd14Zdt/qsLz6ps68C6SY0hKuDngeh0PwcQ48SQXYwjWevceb+ch Bv+0QZXwag7eHyAtTkP/2tCM/8LBf6Q1iq32ahCZ4ZJLarMUzgbGZWpZhO9UsAQXoMNr Y+aFptRlux36xvTWR9sIiQhOuU9WyDgRXYOdEE1KQueMp7XYW4IpMjyRT7yYPvW6oz4+ thjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=/QbJRNwAkGrsLukEp8iKFvGwTUDp33ZHNDiYDKi7qTk=; fh=7Vqc4Wpq1ELCMCZhERcaciq//8c4Of79e+GnxXIgzno=; b=Psg/ktF6rSF+tPcBr6ao/iWZTD5CIxT6QuiETBHpIYXh9ctNN64rxokHRWbMfvRPtp bZ93dWvQnbZX3SvKzxLhBQvZyAOAKuNQAYDPt6nSpNgEWy7IcP0wdjUbU7WHqjwi7ESd OHFO0ynSNvoHjuzZoQjxnY9hupavF5643kT3jH4Euxtz95Bgk1p6jeO+OsgUHfeFH/QG NiN4DDfC7FNaZPelbj8AbwmHPi2HXUa8G4tI+paoTOUM/EsIdj3Gc9PeSmgU3XxLbO11 C3UMb4JX4ugYtQGgQYAVC0PAuqpx1TrZiQDE0hnMADnSklHVKitxhZ39tYoYR/i1yXho d7RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=ZIuG191Q; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id s14-20020aa7c54e000000b005221da34ca8si6052314edr.377.2023.08.07.10.26.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Aug 2023 10:26:17 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=ZIuG191Q; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7E64A3858417 for ; Mon, 7 Aug 2023 17:26:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7E64A3858417 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1691429176; bh=/QbJRNwAkGrsLukEp8iKFvGwTUDp33ZHNDiYDKi7qTk=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ZIuG191QqsknDXIq4rxbnNqOQDzZ49mb0n408Cj0BTkyto+FrIDvNht+xDaiIhuBh IHX1vGgbZhaicHMGqAd6PWxDLX7AP2pZg2/gw7yTY98X0E1e1wfxcP7v7Jc7BL+8tJ xAtKuzp5rRUfb4gqbaK8XiETLwhFsYZTXRI1BPek= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id 2AB9D3858D28 for ; Mon, 7 Aug 2023 17:26:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2AB9D3858D28 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1b9c5e07c1bso42744455ad.2 for ; Mon, 07 Aug 2023 10:26:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691429166; x=1692033966; 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=/QbJRNwAkGrsLukEp8iKFvGwTUDp33ZHNDiYDKi7qTk=; b=llGu0EZnMgEqDr+BGck9Opq2Boca/JfUz6T6age/UPgX5uPWZAvQ4jbcUCOgAgm+qG tAl2mM24ikwh+/qZFCg1SdBji8RDvLoSgCDA6EicYslrRHGZ37S0vY1HVp/DhOcr0aH1 pFHzst2U2O05mjOukk+qTgPVtVD2VQvteJwGMk3U8ZyZTTJ8EFANLaSFxQyLiTKbZA2k OSb002ydMbOIpgxDY1wRMdZhdFCmAzYLrfCXuI7hyREqtjOH3+9um0Q1TjU0+GHTGMij xLN3fkwRoZ1wnBpnx00dVCkHvZ+y8Cll7t0iXUqqwNQ0sNXd70lnTb0n7y3AqYl871MN +GaQ== X-Gm-Message-State: AOJu0YyouglkVJ8NT+1QqSRcofAXcXh/7IhIHawHU4OE1akzqpAvI5ce mMnSUqP+m2pI+jxuOrZUADs1gWQSQKQ= X-Received: by 2002:a17:903:2351:b0:1bb:c69b:6f6b with SMTP id c17-20020a170903235100b001bbc69b6f6bmr12306097plh.6.1691429165596; Mon, 07 Aug 2023 10:26:05 -0700 (PDT) Received: from gnu-cfl-3.localdomain ([172.59.161.42]) by smtp.gmail.com with ESMTPSA id p7-20020a170902bd0700b001b3bf8001a9sm7165136pls.48.2023.08.07.10.26.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Aug 2023 10:26:04 -0700 (PDT) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id 378B3740166 for ; Mon, 7 Aug 2023 10:26:03 -0700 (PDT) To: binutils@sourceware.org Subject: [PATCH] ld: Build libpr23169a.so with -z lazy Date: Mon, 7 Aug 2023 10:26:03 -0700 Message-ID: <20230807172603.33596-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Spam-Status: No, score=-3025.2 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 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "H.J. Lu via Binutils" From: "H.J. Lu" Reply-To: "H.J. Lu" Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773592041292561088 X-GMAIL-MSGID: 1773592041292561088 pr23169b test only works with lazy binding. To work with linker which disables lazy binding by default, build pr23169b binaries with -z lazy. PR ld/30698 * ld-ifunc/ifunc.exp: Build pr23169b binaries with -z lazy. --- ld/testsuite/ld-ifunc/ifunc.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ld/testsuite/ld-ifunc/ifunc.exp b/ld/testsuite/ld-ifunc/ifunc.exp index edabcc3f744..2bf656e73b2 100644 --- a/ld/testsuite/ld-ifunc/ifunc.exp +++ b/ld/testsuite/ld-ifunc/ifunc.exp @@ -604,7 +604,7 @@ run_cc_link_tests [list \ ] \ [list \ "Build libpr23169a.so" \ - "-shared" \ + "-shared -Wl,-z,lazy" \ "-fPIC -O2 -g" \ { pr23169a.c } \ {} \ @@ -751,7 +751,7 @@ run_ld_link_exec_tests [list \ ] \ [list \ "Run pr23169b" \ - "-pie -Wl,--no-as-needed tmpdir/libpr23169a.so" \ + "-pie -Wl,--no-as-needed,-z,lazy tmpdir/libpr23169a.so" \ "" \ { pr23169b.c pr23169c.c } \ "pr23169b" \