From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by sourceware.org (Postfix) with ESMTPS id 97C103858D34 for ; Thu, 9 Jul 2020 05:23:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 97C103858D34 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=maskray.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=emacsray@gmail.com Received: by mail-pg1-f182.google.com with SMTP id l63so452407pge.12 for ; Wed, 08 Jul 2020 22:23:19 -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=CPMGobYLjh9bdm6jxVZRkR7YXcx8HZ1FtFL+QzeDAyM=; b=BI7VMWsbfxewUgpEPve8Q06xhHN+KVlL1OK+S09iXB6FgO6M8ejSv3eUKPYaQQhG5d Y0Ki72V4QE0zgZno5Kv3HKTqvQaoe8udM31JB7vJZNG35yIX5I2cnMMW2aNKdd6dZ/p+ L1Vousty6a+ZDt4383y+QRenXod4R5BkO4qjdyMbuTgTvwcJ1tqXu6dUkhF12lbPLRHn ugXLhBWjN2gTuqnp7urKeVo6dpaCeHp/BzVritkEARwWMy5jJOl/BsuHxfjIpG0UCwQ6 I6NNEUtN2Ve9z3Go9L881+FYlOSho5MK14bhwqgWWfJPcrqzeWQ3wV6jyQCThllMzMi7 k11g== X-Gm-Message-State: AOAM53036aMNmultkAquinezVszLmjLuKdKUjIU/piIb6TRcxMVoMC2S rOxUABRQfCzsnP/28IqzHL7WFnBs X-Google-Smtp-Source: ABdhPJyXNnpM5XXjmCewVrhaFRnmRAog2pFh6OAFZiIC4lW+RTwO9Fd8LC7eIiIzhbsUEbyRhNQoGQ== X-Received: by 2002:a65:620f:: with SMTP id d15mr51113555pgv.270.1594272198609; Wed, 08 Jul 2020 22:23:18 -0700 (PDT) Received: from localhost ([2601:647:4b01:ae80::51fb]) by smtp.gmail.com with ESMTPSA id u128sm1293042pfu.148.2020.07.08.22.23.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2020 22:23:18 -0700 (PDT) Date: Wed, 8 Jul 2020 22:23:17 -0700 From: Fangrui Song To: binutils Subject: Re: [MIPS] Can we have R_MIPS_PC64? Message-ID: <20200709052317.ef5ff6bm6athgbs6@gmail.com> References: <20200205071944.tberxwpcrkhnat4h@gmail.com> <20200208183958.v4vfdtfstlwtod3p@google.com> <20200219042647.rw2fdnb7gbtbmzbz@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200219042647.rw2fdnb7gbtbmzbz@google.com> X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no 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: Thu, 09 Jul 2020 05:23:21 -0000 On 2020-02-18, Fangrui Song wrote: >On 2020-02-17, Maciej W. Rozycki wrote: >>On Sat, 8 Feb 2020, Fangrui Song wrote: >> >>>I hope someone can add back R_MIPS_PC64. >> >>You don't need R_MIPS_PC64. You can yield the same effect the usual >>MIPS64 way, that is by composing R_MIPS_PC32 with R_MIPS_64 (similarly to >>e.g. how R_MIPS_REL32 composes with R_MIPS_64). >> >>Of course the toolchain may not as it stands support this composition. >>Feel free to post patches to take care of your use case. >> >>HTH, >> >> Maciej > >Thank you for your comments. Sorry that I cannot create a patch, as I know very little about MIPS. > >I raised these MIPS issues (including the recent DT_MIPS_XHASH >https://sourceware.org/ml/binutils/2020-01/msg00451.html) not because I >have anything to do with MIPS. I started the threads from the viewpoint >of a toolchain maintainer. > >I noticed MIPS introduced complexity in a number of areas, >where other architectures can share a simple common implementation. >(It is weird that .quad foo - . is not representable on MIPS64.) > >For my own selfish purposes, I will be sad if someone wants to add some >peculiar MIPS features (e.g. DT_MIPS_XHASH) to LLVM binary utilities or >lld. I hope we can get rid of things like >https://reviews.llvm.org/D72228 at some point. > >I hope someone can implement PC64, or something similar for MIPS. Simon Atanasyan has implemented .quad foo-. via a chain of relocation R_MIPS_PC32/R_MIPS_64/R_MIPS_NONE in LLVM's integrated assembler (https://reviews.llvm.org/D80390 ). This will be available in LLVM/Clang 11.0.0 I created a feature request for GNU as: https://sourceware.org/bugzilla/show_bug.cgi?id=26222