From: Jan Beulich <jbeulich@suse.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: binutils@sourceware.org
Subject: Re: [PATCH] x86: Remove duplicated I386_PCREL_TYPE_P/X86_64_PCREL_TYPE_P
Date: Thu, 5 Jan 2023 17:52:55 +0100 [thread overview]
Message-ID: <253e0337-5c05-5e56-de71-6ff890502af3@suse.com> (raw)
In-Reply-To: <CAMe9rOqYFgytTqwah+Pp9ncs8L9njUE-h6uf0=j2sJ-258quMQ@mail.gmail.com>
On 05.01.2023 17:50, H.J. Lu wrote:
> On Wed, Jan 4, 2023 at 11:42 PM Jan Beulich <jbeulich@suse.com> 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.
Jan
next prev parent reply other threads:[~2023-01-05 16:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-04 19:14 H.J. Lu
2023-01-05 7:42 ` Jan Beulich
2023-01-05 16:50 ` H.J. Lu
2023-01-05 16:52 ` Jan Beulich [this message]
2023-01-05 16:55 ` H.J. Lu
2023-01-05 17:01 ` Jan Beulich
2023-01-05 17:03 ` H.J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=253e0337-5c05-5e56-de71-6ff890502af3@suse.com \
--to=jbeulich@suse.com \
--cc=binutils@sourceware.org \
--cc=hjl.tools@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).