From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by sourceware.org (Postfix) with ESMTPS id 0326B3858430 for ; Fri, 29 Oct 2021 19:49:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0326B3858430 Received: by mail-pf1-x42b.google.com with SMTP id l203so10177870pfd.2 for ; Fri, 29 Oct 2021 12:49: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:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Hg2dJUHOLnAsrWcYw2Y276FEf6XDXNisFbV5vTY+vUw=; b=6/AxtAGL6wJ55BjZv3/IozqKoHM1WrTtoPJ0Ks+6tv0trQxuATLvqULOm3l1JckCEq InM271dxWJruGYosCzY5TqTLiod3Gc/3MxE6w9sqQu0iDaZtH13tlarqSKtonyGcbdI4 C5Gu+/erHcHMhxjKrrWRxTasvZBfapzYK4TIYQwI0AALZ1C18M4XJhadosm7Pmls6F/6 +jNEkMcpF61VxbVcOss6/5ZIlhxaCtS/V6Gke/O9XJTg04vXIGZYAj+aUYACJ+a6la7T rayRS2lOYBRcizvl784nLuJ3KzTS0fdCc7dJcG9ojCLh5rS6tFen7gWs8f9uoL0IKvpr gBgw== X-Gm-Message-State: AOAM532eSBtYGytPu/X3RDWiLVDLyeXMuAlYGjBkocZK3zPoxzO69rMB UAWgzHr95KYScYpLtHl19UITBg== X-Google-Smtp-Source: ABdhPJxnlD9gIt6lW3s3JVLgVaF5QEBNO+vGZ3Q4K6VefCVQefA06sBw1sRP2yU+R3Q0gYarfk6VmQ== X-Received: by 2002:a05:6a00:1c46:b0:47b:e953:cf03 with SMTP id s6-20020a056a001c4600b0047be953cf03mr13288939pfw.2.1635536992013; Fri, 29 Oct 2021 12:49:52 -0700 (PDT) Received: from google.com ([2620:15c:2ce:200:cc1b:3207:3348:1a2a]) by smtp.gmail.com with ESMTPSA id b16sm7742843pfm.58.2021.10.29.12.49.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Oct 2021 12:49:51 -0700 (PDT) Date: Fri, 29 Oct 2021 12:49:49 -0700 From: Fangrui Song To: Adhemerval Zanella Cc: libc-alpha@sourceware.org, "H.J. Lu" Subject: Re: [PATCH 1/3] elf: Disable ifuncmain{1,5,5pic,5pie} when using LLD Message-ID: <20211029194949.32ce7f2kr5g2aojs@google.com> References: <20211026200346.3371750-1-adhemerval.zanella@linaro.org> <20211026200346.3371750-2-adhemerval.zanella@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20211026200346.3371750-2-adhemerval.zanella@linaro.org> X-Spam-Status: No, score=-19.8 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, FSL_HELO_FAKE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL 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-List-Received-Date: Fri, 29 Oct 2021 19:49:54 -0000 On 2021-10-26, Adhemerval Zanella wrote: >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. You may use some information from my previous reply https://sourceware.org/pipermail/libc-alpha/2021-October/132292.html to make a better commit message. ifuncmain1.c and ifuncmain5.c take the address of the function `foo_protected`. If compiled with -fno-pic, the produced relocation is R_X86_64_PC32. Nowadays most GCC releases are configured with enable-default-pie and therefore ifuncmain5.c is compiled with the implicit -fpie. So I did not catch this issue. Reviewed-by: Fangrui Song