public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: binutils@sourceware.org
Subject: [PATCH] x86: Update X86_64_GOT_TYPE_P to cover more GOT relocations
Date: Thu,  3 Feb 2022 11:52:57 -0800	[thread overview]
Message-ID: <20220203195257.533435-1-hjl.tools@gmail.com> (raw)

Add R_X86_64_GOT32, R_X86_64_GOT64, R_X86_64_GOTPCREL64 and
R_X86_64_GOTPLT64 to X86_64_GOT_TYPE_P to cover more GOT relocations.

	PR ld/28858
	* elfxx-x86.h (X86_64_GOT_TYPE_P): Add R_X86_64_GOT32,
	R_X86_64_GOT64, R_X86_64_GOTPCREL64 and R_X86_64_GOTPLT64.
---
 bfd/elfxx-x86.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/bfd/elfxx-x86.h b/bfd/elfxx-x86.h
index 4b5784ca08a..3219f363a9a 100644
--- a/bfd/elfxx-x86.h
+++ b/bfd/elfxx-x86.h
@@ -50,7 +50,11 @@
 #define X86_64_GOT_TYPE_P(TYPE) \
   ((TYPE) == R_X86_64_GOTPCREL \
    || (TYPE) == R_X86_64_GOTPCRELX \
-   || (TYPE) == R_X86_64_REX_GOTPCRELX)
+   || (TYPE) == R_X86_64_REX_GOTPCRELX \
+   || (TYPE) == R_X86_64_GOT32 \
+   || (TYPE) == R_X86_64_GOT64 \
+   || (TYPE) == R_X86_64_GOTPCREL64 \
+   || (TYPE) == R_X86_64_GOTPLT64)
 #define I386_GOT_TYPE_P(TYPE) \
   ((TYPE) == R_386_GOT32 || (TYPE) == R_386_GOT32X)
 #define X86_GOT_TYPE_P(IS_X86_64, TYPE) \
-- 
2.34.1


                 reply	other threads:[~2022-02-03 19:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220203195257.533435-1-hjl.tools@gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=binutils@sourceware.org \
    /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).