From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8896 invoked by alias); 8 Feb 2020 18:40:03 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 8872 invoked by uid 89); 8 Feb 2020 18:40:02 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_INFOUSMEBIZ,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.1 spammy=H*f:sk:g@mail., *did*, deficiency, Plus X-HELO: mail-pj1-f65.google.com Received: from mail-pj1-f65.google.com (HELO mail-pj1-f65.google.com) (209.85.216.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 08 Feb 2020 18:40:01 +0000 Received: by mail-pj1-f65.google.com with SMTP id ep11so2358685pjb.2 for ; Sat, 08 Feb 2020 10:40:01 -0800 (PST) Return-Path: Received: from localhost ([2600:380:476e:d91a:b6a2:ed7f:6809:7719]) by smtp.gmail.com with ESMTPSA id 72sm7382181pfw.7.2020.02.08.10.39.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Feb 2020 10:39:59 -0800 (PST) Date: Sat, 08 Feb 2020 18:40:00 -0000 From: Fangrui Song To: Andrew Pinski Cc: binutils Subject: Re: [MIPS] Can we have R_MIPS_PC64? Message-ID: <20200208183958.v4vfdtfstlwtod3p@google.com> References: <20200205071944.tberxwpcrkhnat4h@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-SW-Source: 2020-02/txt/msg00123.txt.bz2 On 2020-02-05, Andrew Pinski wrote: >On Wed, Feb 5, 2020@1:10 AM Andrew Pinski wrote: >> >> On Wed, Feb 5, 2020@1:04 AM Andrew Pinski wrote: >> > >> > On Wed, Feb 5, 2020@12:59 AM Andrew Pinski wrote: >> > > >> > > On Tue, Feb 4, 2020@11:20 PM Fangrui Song wrote: >> > > > >> > > > R_MIPS_PC32 exists as a GNU extension. >> > > > R_MIPS_PC64 existed, but was removed by https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=4030e8f62467c29b782aa2480e1e452b8e458699 >> > > > (like all the old commits, the description just recorded what the commit *did*. There was no *why*.) >> > > >> > > But the why is recorded still in the mail archives: >> > > https://sourceware.org/ml/binutils/2004-04/msg00657.html >> > >> > See the GCC side of the reason: >> > https://gcc.gnu.org/ml/gcc-patches/2004-04/msg01093.html >> >> Note the reason why R_MIPS_PC32 was added back is described here: >> https://sourceware.org/ml/binutils/2004-06/msg00213.html >> >> So it is a GNU extension as GCC accidentally emitted them so it needed >> to be added back. > > >> * DW_EH_PE_pcrel|DW_EH_PE_sdata8 => ? >Never used on MIPS, see >https://gcc.gnu.org/ml/gcc-patches/2004-06/msg00970.html >Plus: >https://www.sourceware.org/ml/binutils/2004-05/msg00227.html > >> >> >> Thanks, >> Andrew >> >> > >> > >> > Thanks, >> > Andrew Pinski >> > >> > > >> > > Thanks, >> > > Andrew Pinski >> > > >> > > >> > > > >> > > > This just makes certain things unnecessarily complex. >> > > > >> > > > * DW_EH_PE_pcrel|DW_EH_PE_sdata8 => ? >> > > > * __patchable_function_entries has to have the SHF_WRITE flag on MIPS https://gcc.gnu.org/ml/gcc/2020-01/msg00106.html >> > > > .quad foo - . => Error: PC-relative reference to a different section I hope someone can add back R_MIPS_PC64. I don't have any take on MIPS. I just feel that MIPS64 makes other 64-bit architectures inconvenient due to its own deficiency.