From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id 23AE73894411 for ; Wed, 16 Jun 2021 06:31:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 23AE73894411 Received: by mail-pl1-x62d.google.com with SMTP id 69so603011plc.5 for ; Tue, 15 Jun 2021 23:31:54 -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=YCZmULNwB0JeY18O/2hmPjI9kB0nGb6GIwnSHkhdk4A=; b=RzFf6LWRpL2tazH+F0ag3FFA5uQUsqmkF0ld1ERl9gq7gsVHR8FThGqfkSudLURj2W A9GCNxzPuVh4eeJF7dB+IhnhV2hqu5c+F7llC8QpA2kLo/DllravJGW7iFXP7koavDKQ JbK28mL0OLcdTA913RNLx+QOmV+9AidMlSy92XlueKUyOWP0P4hqXbRfW2cTN3sc0m3m ALs8i8yGUXoq+zxpcAutefqSTBAhiV/5Xlk4p2JPI2Vu15ixCKcXOjSdhOzfcc6sLIu0 vFSFlnjJ0YVmFMGxVxy3rPN04g73HDuFvLqW3KxhS4lvMAkUNlOqtPRW32DM4YobTZgv nv+A== X-Gm-Message-State: AOAM532teXw/mnowtz8DnVczOHk+7lsJc6p391bj/213jkfiLydf5uOP IVYODWVEk4O8naPR7o+ewHo= X-Google-Smtp-Source: ABdhPJw0LavA3dMfmuzBN6PYF7/B6AWsajh94qQtWHJykCdVpbFRvVR4B7fJegJs6H7tYxkJf5yrNw== X-Received: by 2002:a17:90b:4d92:: with SMTP id oj18mr3402154pjb.89.1623825113320; Tue, 15 Jun 2021 23:31:53 -0700 (PDT) Received: from bubble.grove.modra.org ([2406:3400:51d:8cc0:333c:1c44:3fd5:31a2]) by smtp.gmail.com with ESMTPSA id s16sm1046845pfc.33.2021.06.15.23.31.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Jun 2021 23:31:52 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id A5E51BB00043; Wed, 16 Jun 2021 16:01:48 +0930 (ACST) Date: Wed, 16 Jun 2021 16:01:48 +0930 From: Alan Modra To: Fangrui Song Cc: Cary Coutant , "H.J. Lu" , Michael Matz , Florian Weimer , Szabolcs Nagy , "binutils@sourceware.org" , Fangrui Song Subject: Re: [PATCH] Allow direct access relocations referencing a protected function symbol Message-ID: References: <20210613215400.261932-1-maskray@google.com> <20210614174336.4g4gesqc6nxnmho4@gmail.com> <20210615031932.i4g36e4bmwplsgoi@gmail.com> <20210616044217.6coujfcfpvz2de5h@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210616044217.6coujfcfpvz2de5h@gmail.com> X-Spam-Status: No, score=-3031.4 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: Wed, 16 Jun 2021 06:31:55 -0000 On Tue, Jun 15, 2021 at 09:42:17PM -0700, Fangrui Song wrote: > On 2021-06-16, Alan Modra wrote: > > On Mon, Jun 14, 2021 at 08:19:32PM -0700, Fangrui Song wrote: > > > On 2021-06-15, Alan Modra wrote: > > > > On Mon, Jun 14, 2021 at 10:43:36AM -0700, Fangrui Song wrote: > > > > > I shall add a note that this patch will restore the behavior before late > > > > > 2015 or early 2016. > > > > > > > > Also add a note that the patch you posted is incorrect. > > > > > > Only the description needs an update. The code is correct. > > > > How would you respond if I submitted a patch to lld that you could see > > was wrong, but I kept arrogantly claiming was correct? > > If you have found a mistake, please point out the mistake. No euphemism or > sarcasm is needed. I already told you exactly what was wrong with your patch in my first email in this thread. _bfd_elf_symbol_refs_local_p is a function used by many ELF targets. You cannot lightly make a change to this function. A change that even ignores comments in the function! That was your first mistake. Furthermore, you did not test the change very well. That was your second mistake. Not an uncommon mistake, of course. I fully expect your change will cause failures in some part of the toolchain (gcc+glibc+binutils) testsuites even on x86, particularly when using older gcc. Also, if you had tested the change more widely you would have found a regression just in the binutils testsuite on a less popular target. -- Alan Modra Australia Development Lab, IBM