public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: mengqinggang <mengqinggang@loongson.cn>
To: binutils@sourceware.org
Cc: xuchenghua@loongson.cn, liuzhensong@loongson.cn,
	chenglulu@loongson.cn, xry111@xry111.site, i.swmail@xen0n.name,
	maskray@google.com, mengqinggang <mengqinggang@loongson.cn>
Subject: [PATCH] LoongArch: Fix dynamic reloc not generated bug in some cases.
Date: Sat,  3 Dec 2022 15:34:35 +0800	[thread overview]
Message-ID: <20221203073435.1451856-1-mengqinggang@loongson.cn> (raw)

bfd/ChangeLog:

	* elfnn-loongarch.c (loongarch_elf_relocate_section): Likewise.
---
 bfd/elfnn-loongarch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c
index c040c5b4ec8..8d8a6a47317 100644
--- a/bfd/elfnn-loongarch.c
+++ b/bfd/elfnn-loongarch.c
@@ -2890,7 +2890,7 @@ loongarch_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
 	      /* The offset must always be a multiple of the word size.
 		 So, we can use the least significant bit to record
 		 whether we have already processed this entry.  */
-	      if (local_got_offsets[r_symndx] == 0)
+	      if ((local_got_offsets[r_symndx] & 1) == 0)
 		{
 		  if (is_pic)
 		    {
-- 
2.36.0


                 reply	other threads:[~2022-12-03  7:34 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=20221203073435.1451856-1-mengqinggang@loongson.cn \
    --to=mengqinggang@loongson.cn \
    --cc=binutils@sourceware.org \
    --cc=chenglulu@loongson.cn \
    --cc=i.swmail@xen0n.name \
    --cc=liuzhensong@loongson.cn \
    --cc=maskray@google.com \
    --cc=xry111@xry111.site \
    --cc=xuchenghua@loongson.cn \
    /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).