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 6018A3848429 for ; Mon, 14 Jun 2021 13:20:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6018A3848429 Received: by mail-pl1-x631.google.com with SMTP id 11so6529527plk.12 for ; Mon, 14 Jun 2021 06:20:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ab/OH11FlanOT/A5HYHRjVMZaKaGx4pF8v8t9qr17P8=; b=MPmFX/DMdY8RJAVeSpuS4hQRBUM/STwyAISLLkUp+p0khEKW63gzvImodoDZ0SDa4q IrqQ3c2wjpVpyeXPQt10jiO5COTimex1eqQmVugLIbvluwEwSOn7vvItf+Sbur7T9vG+ 5g26VwqgdMTQJ1j2jbgHMZwWyMpJxZU0Wyf2irH2qnX8Xbm670yOfer6cGJQBR1Yny1Y /kO4SxtqYrdfKpjJ5UhJSnmyKvHahaBLwJWR4uCfKvL00v2Xac0Jy+sLkRCQ0gAOIaK+ EIBy+/chXxvcJfctvInAzDW1CdrBm+0GjGTiudAJWW5WyxTsk5U1Z04nX5kl+BCpU+wv Cn4g== X-Gm-Message-State: AOAM5307drVasLLOY9lCTfvgu/rLnxh/pwTV6Ik/ntP7N+UXiqgUEax3 WyMYHH4cWDj1FvnCebjM69/57pRSLN4Ocg== X-Google-Smtp-Source: ABdhPJy3PGCZ0Hkc8XS8nPV1hHcGFKq5rCNK7NrIe6DMsAFe65Hq6usLs6C2SK2ijBb/pFVIOfzlnA== X-Received: by 2002:a17:90b:1048:: with SMTP id gq8mr24159309pjb.213.1623676837647; Mon, 14 Jun 2021 06:20:37 -0700 (PDT) Received: from bubble.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id gk14sm10432pjb.3.2021.06.14.06.20.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Jun 2021 06:20:36 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id AAF5EBB01B7B; Mon, 14 Jun 2021 22:50:32 +0930 (ACST) Date: Mon, 14 Jun 2021 22:50:32 +0930 From: Alan Modra To: Fangrui Song Cc: binutils@sourceware.org, Florian Weimer , Szabolcs Nagy Subject: Re: [PATCH] Allow direct access relocations referencing a protected function symbol Message-ID: References: <20210613215400.261932-1-maskray@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210613215400.261932-1-maskray@google.com> X-Spam-Status: No, score=-3033.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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-List-Received-Date: Mon, 14 Jun 2021 13:20:39 -0000 On Sun, Jun 13, 2021 at 02:54:00PM -0700, Fangrui Song via Binutils wrote: > This fixes the bogus "relocation R_* against protected symbol `foo' > can not be used when making a shared object" for function symbols for > at least aarch64/i386/x86-64. > > The controversial "copy relocations on protected data symbols" (which has some > fragile glibc support) is irrelevant to function symbols. No, this patch doesn't do that. What you are doing here will disable dynamic relocations on protected function symbols in shared libraries. That will break function pointer comparison for architectures that implement non-pic executables, where a function that is undefined in the executable is given a fixed address in the executable, that of its plt call code. -- Alan Modra Australia Development Lab, IBM