From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) by sourceware.org (Postfix) with ESMTPS id 616603858D35 for ; Thu, 5 Jan 2023 16:56:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 616603858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-x236.google.com with SMTP id v70so32451122oie.3 for ; Thu, 05 Jan 2023 08:56:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=6YjCGCb7hRcmJUO6A4s+cQjgdWoV/wa0DrSeEG0Hi54=; b=EuqPouyRtR9Zz7/UI8WvxU12OgFiPvmZQRjxPUyR4/UyhLNPl6JyLlsE2bsyh9JkNi VRhHp1J8zylxGEOkfCwtQI8a59GkSQy4yXc55umajgNgEfWKT6leO/CGWi90AhhK1eSq anrO9HM5NP2qkd2EEA/BsnFuD5Hv6WhYvl2bmyqdpmnQ3btzZt0ldVBvmMTdKocOLlLT +wtw65fu2cRMAfFS3Fb9IT2oLmAcM/yrE/Bpjupq52HYTGaxk4Zqua+wnZ+0dquAfhyG x3b8b3p8JvuwnlKkudDQaJjq17BfTHJDGoP2grGgcCUCOzqxGooWxSnV0njQyHzJIOAb DF9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6YjCGCb7hRcmJUO6A4s+cQjgdWoV/wa0DrSeEG0Hi54=; b=OlRD1TNrk4ozAVZ3HA9pgnwPsNorM9MDJ12wCFUJmsu/0FQih2QPVcRmw797WrarfF /XtCgO6WPf9jYmEeqcgsa5yqh5lKItw1v6oEUXg37B5bK8Z6c1qOfznNUsszYR6TlcGM ew6MyEurdkeAJHQ1EXtZuxoeNzzm5iQnQyzq6D+NF3GyRQLkVN7whTI6nj9HvrgmCQp3 b2rBSSz+YKGQTDNspSeIHoaE5ue+t2cJOb25r0ERSRmhr+FV7yPLYWky/zPWjYu6F0Af VhRBdg3ICfiNuzoN3Zfpmbu1YGYrIJSjC4Y4PGhrBb4GWPjhX5KhoaGoe6LaNVdowLJ3 Cxtw== X-Gm-Message-State: AFqh2krj2YCIcfYI4ARwBcklE4rHUrR1euk5mHdK4C+MwLjTkrhkJgAc C+JZhrlhy2ZKz5sUNrXH7MLmFGicdr65JfA4mH4OfM++7ZE= X-Google-Smtp-Source: AMrXdXuOH0RPdZRUh5yV2CfItku0gGCmgMrRhArzUS8l+S+Dk+tpNU9L6/7GyBBw6z4i9qrX0GHCvEmkQ3oCEncHBrA= X-Received: by 2002:aca:1e0e:0:b0:359:d97b:3f6f with SMTP id m14-20020aca1e0e000000b00359d97b3f6fmr4205782oic.298.1672937791711; Thu, 05 Jan 2023 08:56:31 -0800 (PST) MIME-Version: 1.0 References: <20230104191414.149668-1-hjl.tools@gmail.com> <707373e1-01e6-21ea-c407-db61da912e22@suse.com> <253e0337-5c05-5e56-de71-6ff890502af3@suse.com> In-Reply-To: <253e0337-5c05-5e56-de71-6ff890502af3@suse.com> From: "H.J. Lu" Date: Thu, 5 Jan 2023 08:55:55 -0800 Message-ID: Subject: Re: [PATCH] x86: Remove duplicated I386_PCREL_TYPE_P/X86_64_PCREL_TYPE_P To: Jan Beulich Cc: binutils@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3017.0 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, Jan 5, 2023 at 8:52 AM Jan Beulich wrote: > > On 05.01.2023 17:50, H.J. Lu wrote: > > On Wed, Jan 4, 2023 at 11:42 PM Jan Beulich wrote: > >> > >> On 04.01.2023 20:14, H.J. Lu via Binutils wrote: > >>> I386_PCREL_TYPE_P and X86_64_PCREL_TYPE_P are defined twice. Remove > >>> the duplications. > >> > >> I recall noticing this as well, quite some time back, but I didn't feel > >> like touching it because I was puzzled by ... > >> > >>> --- a/bfd/elfxx-x86.h > >>> +++ b/bfd/elfxx-x86.h > >>> @@ -97,13 +97,6 @@ > >>> #define PLT_FDE_START_OFFSET 4 + PLT_CIE_LENGTH + 8 > >>> #define PLT_FDE_LEN_OFFSET 4 + PLT_CIE_LENGTH + 12 > >>> > >>> -#define I386_PCREL_TYPE_P(TYPE) ((TYPE) == R_386_PC32) > >> > >> ... this not including PC8 and PC16 when ... > > > > This is I386_PCREL_TYPE_P. > > > >>> -#define X86_64_PCREL_TYPE_P(TYPE) \ > >>> - ((TYPE) == R_X86_64_PC8 \ > >>> - || (TYPE) == R_X86_64_PC16 \ > >>> - || (TYPE) == R_X86_64_PC32 \ > >>> - || (TYPE) == R_X86_64_PC64) > >> > >> ... this does. > > > > This is X86_64_PCREL_TYPE_P, not I386_PCREL_TYPE_P. > > > >> Jan > > > > The current ones have > > > > #define X86_64_PCREL_TYPE_P(TYPE) \ > > ((TYPE) == R_X86_64_PC8 \ > > || (TYPE) == R_X86_64_PC16 \ > > || (TYPE) == R_X86_64_PC32 \ > > || (TYPE) == R_X86_64_PC64) > > #define I386_PCREL_TYPE_P(TYPE) ((TYPE) == R_386_PC32) > > > > and the ones I removed are > > > > -#define I386_PCREL_TYPE_P(TYPE) ((TYPE) == R_386_PC32) > > -#define X86_64_PCREL_TYPE_P(TYPE) \ > > - ((TYPE) == R_X86_64_PC8 \ > > - || (TYPE) == R_X86_64_PC16 \ > > - || (TYPE) == R_X86_64_PC32 \ > > - || (TYPE) == R_X86_64_PC64) > > > > They are identical. > > That wasn't the question, though. I really did ask about the 32-bit vs > 64-bit difference, which looks suspect to me. > R_386_PC8 and R_386_PC16 were never handled by linker. -- H.J.