From: WANG Xuerui <i.swmail@xen0n.name>
To: liuzhensong <liuzhensong@loongson.cn>, binutils@sourceware.org
Cc: i.swmail@xen0n.name, xry111@xry111.site, maskray@google.com,
caiyinyu@loongson.cn, chenglulu@loongson.cn,
mengqinggang@loongson.cn, xuchenghua@loongson.cn
Subject: Re: [PATCH] LoongArch: ld: Fix bug not generate plt when link a x.so
Date: Sat, 20 Aug 2022 18:56:18 +0800 [thread overview]
Message-ID: <c9af6f90-c1b4-9aa3-f059-2bf131719f3a@xen0n.name> (raw)
In-Reply-To: <20220820090835.543726-1-liuzhensong@loongson.cn>
Hi,
On 8/20/22 17:08, liuzhensong wrote:
> bfd/
> elfnn-loongarch.c
Could use some explanation as to why this is a problem, with a minimal
reproduction example or otherwise how did you encounter this. Because
the patch title is not of much help.
Also a testsuite addition would probably be nice.
> ---
> bfd/elfnn-loongarch.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c
> index 8d0f66ea7c1..a9ca20ee49b 100644
> --- a/bfd/elfnn-loongarch.c
> +++ b/bfd/elfnn-loongarch.c
> @@ -746,6 +746,14 @@ loongarch_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
> case R_LARCH_PCALA_HI20:
> if (h != NULL)
> {
> + /* For pcalau12i + jirl. */
> + {
> + h->needs_plt = 1;
> + if (h->plt.refcount < 0)
> + h->plt.refcount = 0;
> + h->plt.refcount++;
> + }
> +
> h->non_got_ref = 1;
> h->pointer_equality_needed = 1;
> }
next prev parent reply other threads:[~2022-08-20 10:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-20 9:08 liuzhensong
2022-08-20 10:56 ` WANG Xuerui [this message]
2022-08-20 11:19 ` Xi Ruoyao
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=c9af6f90-c1b4-9aa3-f059-2bf131719f3a@xen0n.name \
--to=i.swmail@xen0n.name \
--cc=binutils@sourceware.org \
--cc=caiyinyu@loongson.cn \
--cc=chenglulu@loongson.cn \
--cc=liuzhensong@loongson.cn \
--cc=maskray@google.com \
--cc=mengqinggang@loongson.cn \
--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).