From patchwork Tue Oct 26 20:03:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 46671 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 04C34385843C for ; Tue, 26 Oct 2021 20:05:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 04C34385843C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1635278737; bh=0ijNRb9UORPveq+1F5wDZqSSH6U3myI+eHGWNOF8wk4=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=iErHrJXJCRZFqP6EMoBrZcDKB3FdwdDO3qnUHE382pEygwx9Fisg3W2hN3jreIiXf HQobJD85N+s7i3tFuxYlvhuxCtKW9K3aAhgATIsmjU+/puggp/tdkb7lMtLxIRKNOB AZSkipKzwUoWWI7+Xsz51yDp7KT3y+GtorsgdBMY= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by sourceware.org (Postfix) with ESMTPS id 687403858410 for ; Tue, 26 Oct 2021 20:03:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 687403858410 Received: by mail-oi1-x22d.google.com with SMTP id r6so280641oiw.2 for ; Tue, 26 Oct 2021 13:03:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0ijNRb9UORPveq+1F5wDZqSSH6U3myI+eHGWNOF8wk4=; b=jXKUlFyixvXW/wSqTrgKkPS58D3+h9p9TaQ1lxuOO3wjwBVdcPZwYvyHzcz3H2xFCR wd5VK3XvhDMD632f3ZKjxxL88QzqkXZ98aaSP2bfc431RemsST/QvhEW9fZ6sfOfZQ30 /hi0d7UYaNC21z5DDGDpUYsq+4oBFZ8Y+0bxkGNMwI37IDb3dD5xzFANhyx4CFYpVrys r6QhMZId0dkZZWj2XKYC55hJGd7MGlkyhvXesCdjTe1YD2uWTN6h3cCim9izXsiR5NyQ 4k3/s52srxd1g7iCiACXAXnc7NBUuLMw8UzsY/cTGXD7tYt9wib+lGMXV9j+HxGuSTTV hrKg== X-Gm-Message-State: AOAM5327wktihYo3Th7non10aokVTwKW0V4oZYq8/47D5a2qKcBakqUe e0dMZsGOQv0tIXQvRxge1752+PRSK7Myeg== X-Google-Smtp-Source: ABdhPJxFYU668TiF/FvXanDEHgKD/zrz92PxpMtwu81UHQSrp5gg0C7SCK4NQDfQ9CdUx78imb30Fw== X-Received: by 2002:a05:6808:f0e:: with SMTP id m14mr639545oiw.67.1635278631668; Tue, 26 Oct 2021 13:03:51 -0700 (PDT) Received: from birita.. ([2804:431:c7cb:6672:308c:d549:2f1f:5bb6]) by smtp.gmail.com with ESMTPSA id l3sm2689062otu.6.2021.10.26.13.03.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Oct 2021 13:03:51 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH 1/3] elf: Disable ifuncmain{1,5,5pic,5pie} when using LLD Date: Tue, 26 Oct 2021 17:03:44 -0300 Message-Id: <20211026200346.3371750-2-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211026200346.3371750-1-adhemerval.zanella@linaro.org> References: <20211026200346.3371750-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" These tests takes the address of a protected symbol (foo_protected) and lld does not support copy relocations on protected data symbols. Checked on x86_64-linux-gnu. Reviewed-by: Fangrui Song --- elf/Makefile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/elf/Makefile b/elf/Makefile index bdcf4cb885..477207a297 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -427,11 +427,14 @@ ifeq (yes,$(build-shared)) tests += tst-ifunc-fault-lazy tst-ifunc-fault-bindnow # Note: sysdeps/x86_64/ifuncmain8.c uses ifuncmain8. tests-internal += \ - ifuncmain1 ifuncmain1pic ifuncmain1vis ifuncmain1vispic \ + ifuncmain1pic ifuncmain1vis ifuncmain1vispic \ ifuncmain1staticpic \ ifuncmain2 ifuncmain2pic ifuncmain3 ifuncmain4 \ - ifuncmain5 ifuncmain5pic ifuncmain5staticpic \ + ifuncmain5staticpic \ ifuncmain7 ifuncmain7pic +ifeq (no,$(with-lld)) +tests-internal += ifuncmain1 ifuncmain5 ifuncmain5pic +endif ifeq (yes,$(have-gcc-ifunc)) tests-internal += ifuncmain9 ifuncmain9pic endif @@ -441,17 +444,23 @@ extra-test-objs += $(ifunc-test-modules:=.o) test-internal-extras += $(ifunc-test-modules) ifeq (yes,$(have-fpie)) ifunc-pie-tests = ifuncmain1pie ifuncmain1vispie ifuncmain1staticpie \ - ifuncmain5pie ifuncmain6pie ifuncmain7pie + ifuncmain6pie ifuncmain7pie ifeq (yes,$(have-gcc-ifunc)) ifunc-pie-tests += ifuncmain9pie endif +ifeq (no,$(with-lld)) +ifunc-pie-tests += ifuncmain5pie +endif ifeq (yes,$(have-textrel_ifunc)) ifunc-pie-tests += tst-ifunc-textrel endif tests-internal += $(ifunc-pie-tests) tests-pie += $(ifunc-pie-tests) endif -modules-names += ifuncmod1 ifuncmod3 ifuncmod5 ifuncmod6 +modules-names += ifuncmod1 ifuncmod3 ifuncmod6 +ifeq (no,$(with-lld)) +modules-names += ifuncmod5 +endif endif endif