public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Binutils <binutils@sourceware.org>,
	Nick Clifton <nickc@redhat.com>,  Alan Modra <amodra@gmail.com>
Subject: Re: [PATCH] bfin: Don't call bfd_elf_link_record_dynamic_symbol
Date: Tue, 5 Jan 2021 16:15:18 -0800	[thread overview]
Message-ID: <CAMe9rOrJno2J404cUnNomvVX=Xx=x+U6Z9o7HwtBL7u4tgWpDQ@mail.gmail.com> (raw)
In-Reply-To: <20201229184551.463356-1-hjl.tools@gmail.com>

On Tue, Dec 29, 2020 at 10:45 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> bfinfdpic_check_relocs shouldn't call bfd_elf_link_record_dynamic_symbol
> since it has been called from elf_link_add_object_symbols.  This fixed:
>
> FAIL: ld-elf/pr26979a
> FAIL: ld-elf/pr26979b
> FAIL: Symbol export class test (final shared object)
>
>         * elf32-bfin.c (bfinfdpic_check_relocs): Don't call
>         bfd_elf_link_record_dynamic_symbol.
> ---
>  bfd/elf32-bfin.c | 20 ++++----------------
>  1 file changed, 4 insertions(+), 16 deletions(-)
>
> diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c
> index ab928530db..931dd0d007 100644
> --- a/bfd/elf32-bfin.c
> +++ b/bfd/elf32-bfin.c
> @@ -4559,22 +4559,10 @@ bfinfdpic_check_relocs (bfd *abfd, struct bfd_link_info *info,
>               break;
>             }
>           if (h != NULL)
> -           {
> -             if (h->dynindx == -1)
> -               switch (ELF_ST_VISIBILITY (h->other))
> -                 {
> -                 case STV_INTERNAL:
> -                 case STV_HIDDEN:
> -                   break;
> -                 default:
> -                   bfd_elf_link_record_dynamic_symbol (info, h);
> -                   break;
> -                 }
> -             picrel
> -               = bfinfdpic_relocs_info_for_global (bfinfdpic_relocs_info (info),
> -                                                  abfd, h,
> -                                                  rel->r_addend, INSERT);
> -           }
> +           picrel
> +             = bfinfdpic_relocs_info_for_global (bfinfdpic_relocs_info (info),
> +                                                 abfd, h,
> +                                                 rel->r_addend, INSERT);
>           else
>             picrel = bfinfdpic_relocs_info_for_local (bfinfdpic_relocs_info
>                                                      (info), abfd, r_symndx,
> --
> 2.29.2
>

Hi Nick, Alan,

Can you review this patch?

Thanks.


-- 
H.J.

  reply	other threads:[~2021-01-06  0:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-29 18:45 H.J. Lu
2021-01-06  0:15 ` H.J. Lu [this message]
2021-01-06  5:44   ` Alan Modra
2021-01-08 11:27   ` Nick Clifton
2021-01-09 14:22     ` H.J. Lu
2021-01-06 10:04 ` Mike Frysinger
2021-01-06 12:16   ` H.J. Lu
2021-01-06 13:24     ` [PATCH] bfin: Check bfd_link_hash_indirect H.J. Lu
2021-01-06 23:21       ` Mike Frysinger
2021-01-12  6:49         ` Mike Frysinger
2021-01-06 23:36       ` Alan Modra
2021-01-06 23:57         ` Mike Frysinger
2021-01-07  0:37           ` H.J. Lu
2021-01-07  0:55             ` Mike Frysinger

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='CAMe9rOrJno2J404cUnNomvVX=Xx=x+U6Z9o7HwtBL7u4tgWpDQ@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.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).