This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] bfd/elf-ifunc.c: Remove unused function, _bfd_elf_create_ifunc_dyn_reloc.
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Will Newton <will dot newton at linaro dot org>
- Cc: Binutils <binutils at sourceware dot org>, Patch Tracking <patches at linaro dot org>
- Date: Tue, 7 May 2013 09:30:00 -0700
- Subject: Re: [PATCH] bfd/elf-ifunc.c: Remove unused function, _bfd_elf_create_ifunc_dyn_reloc.
- References: <5188D150 dot 1010100 at linaro dot org>
On Tue, May 7, 2013 at 3:02 AM, Will Newton <will.newton@linaro.org> wrote:
>
> bfd/ChangeLog:
>
> 2013-05-07 Will Newton <will.newton@linaro.org>
>
> * elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Remove unused
> function.
> * elf-bfd.h: Likewise.
> ---
> bfd/elf-bfd.h | 3 ---
> bfd/elf-ifunc.c | 45 ---------------------------------------------
> 2 files changed, 48 deletions(-)
>
> diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
> index b643dbc..d1a7e26 100644
> --- a/bfd/elf-bfd.h
> +++ b/bfd/elf-bfd.h
> @@ -2378,9 +2378,6 @@ struct elf_dyn_relocs
>
> extern bfd_boolean _bfd_elf_create_ifunc_sections
> (bfd *, struct bfd_link_info *);
> -extern asection * _bfd_elf_create_ifunc_dyn_reloc
> - (bfd *, struct bfd_link_info *, asection *sec, asection *sreloc,
> - struct elf_dyn_relocs **);
> extern bfd_boolean _bfd_elf_allocate_ifunc_dyn_relocs
> (struct bfd_link_info *, struct elf_link_hash_entry *,
> struct elf_dyn_relocs **, unsigned int, unsigned int);
> diff --git a/bfd/elf-ifunc.c b/bfd/elf-ifunc.c
> index c2fa163..ea08329 100644
> --- a/bfd/elf-ifunc.c
> +++ b/bfd/elf-ifunc.c
> @@ -104,51 +104,6 @@ _bfd_elf_create_ifunc_sections (bfd *abfd, struct bfd_link_info *info)
> return TRUE;
> }
>
> -/* For a STT_GNU_IFUNC symbol, create a dynamic reloc section, SRELOC,
> - for the input section, SEC, and append this reloc to HEAD. */
> -
> -asection *
> -_bfd_elf_create_ifunc_dyn_reloc (bfd *abfd, struct bfd_link_info *info,
> - asection *sec, asection *sreloc,
> - struct elf_dyn_relocs **head)
> -{
> - struct elf_dyn_relocs *p;
> - struct elf_link_hash_table *htab = elf_hash_table (info);
> -
> - if (sreloc == NULL)
> - {
> - const struct elf_backend_data *bed = get_elf_backend_data (abfd);
> -
> - if (htab->dynobj == NULL)
> - htab->dynobj = abfd;
> -
> - sreloc = _bfd_elf_make_dynamic_reloc_section (sec, htab->dynobj,
> - bed->s->log_file_align,
> - abfd,
> - bed->rela_plts_and_copies_p);
> - if (sreloc == NULL)
> - return NULL;
> - }
> -
> - p = *head;
> - if (p == NULL || p->sec != sec)
> - {
> - bfd_size_type amt = sizeof *p;
> -
> - p = ((struct elf_dyn_relocs *) bfd_alloc (htab->dynobj, amt));
> - if (p == NULL)
> - return NULL;
> - p->next = *head;
> - *head = p;
> - p->sec = sec;
> - p->count = 0;
> - p->pc_count = 0;
> - }
> - p->count += 1;
> -
> - return sreloc;
> -}
> -
> /* Allocate space in .plt, .got and associated reloc sections for
> dynamic relocs against a STT_GNU_IFUNC symbol definition. */
>
> --
> 1.8.1.4
>
OK. Thanks.
--
H.J.