bfd/elf-ifunc.c: Add header size arg to _bfd_elf_allocate_ifunc_dyn_relocs.
bfd/ChangeLog: 2013-05-07 Will Newton <will.newton@linaro.org> * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Add a plt_header_size argument for ports where it differs from plt_entry_size. * elf-bfd.h: Likewise. * elf32-i386.c: Pass plt_header_size to _bfd_elf_allocate_ifunc_dyn_relocs. * elf64-x86-64.c: Likewise.
This commit is contained in:
parent
1ee9e8b3d2
commit
7b70956dc8
5 changed files with 16 additions and 3 deletions
|
@ -1,3 +1,13 @@
|
||||||
|
2013-05-07 Will Newton <will.newton@linaro.org>
|
||||||
|
|
||||||
|
* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Add a
|
||||||
|
plt_header_size argument for ports where it differs from
|
||||||
|
plt_entry_size.
|
||||||
|
* elf-bfd.h: Likewise.
|
||||||
|
* elf32-i386.c: Pass plt_header_size to
|
||||||
|
_bfd_elf_allocate_ifunc_dyn_relocs.
|
||||||
|
* elf64-x86-64.c: Likewise.
|
||||||
|
|
||||||
2013-05-07 Will Newton <will.newton@linaro.org>
|
2013-05-07 Will Newton <will.newton@linaro.org>
|
||||||
|
|
||||||
* elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Remove unused
|
* elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Remove unused
|
||||||
|
|
|
@ -2380,7 +2380,7 @@ extern bfd_boolean _bfd_elf_create_ifunc_sections
|
||||||
(bfd *, struct bfd_link_info *);
|
(bfd *, struct bfd_link_info *);
|
||||||
extern bfd_boolean _bfd_elf_allocate_ifunc_dyn_relocs
|
extern bfd_boolean _bfd_elf_allocate_ifunc_dyn_relocs
|
||||||
(struct bfd_link_info *, struct elf_link_hash_entry *,
|
(struct bfd_link_info *, struct elf_link_hash_entry *,
|
||||||
struct elf_dyn_relocs **, unsigned int, unsigned int);
|
struct elf_dyn_relocs **, unsigned int, unsigned int, unsigned int);
|
||||||
|
|
||||||
extern void elf_append_rela (bfd *, asection *, Elf_Internal_Rela *);
|
extern void elf_append_rela (bfd *, asection *, Elf_Internal_Rela *);
|
||||||
extern void elf_append_rel (bfd *, asection *, Elf_Internal_Rela *);
|
extern void elf_append_rel (bfd *, asection *, Elf_Internal_Rela *);
|
||||||
|
|
|
@ -112,6 +112,7 @@ _bfd_elf_allocate_ifunc_dyn_relocs (struct bfd_link_info *info,
|
||||||
struct elf_link_hash_entry *h,
|
struct elf_link_hash_entry *h,
|
||||||
struct elf_dyn_relocs **head,
|
struct elf_dyn_relocs **head,
|
||||||
unsigned int plt_entry_size,
|
unsigned int plt_entry_size,
|
||||||
|
unsigned int plt_header_size,
|
||||||
unsigned int got_entry_size)
|
unsigned int got_entry_size)
|
||||||
{
|
{
|
||||||
asection *plt, *gotplt, *relplt;
|
asection *plt, *gotplt, *relplt;
|
||||||
|
@ -193,7 +194,7 @@ keep:
|
||||||
/* If this is the first .plt entry, make room for the special
|
/* If this is the first .plt entry, make room for the special
|
||||||
first entry. */
|
first entry. */
|
||||||
if (plt->size == 0)
|
if (plt->size == 0)
|
||||||
plt->size += plt_entry_size;
|
plt->size += plt_header_size;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -2197,7 +2197,8 @@ elf_i386_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
|
||||||
if (h->type == STT_GNU_IFUNC
|
if (h->type == STT_GNU_IFUNC
|
||||||
&& h->def_regular)
|
&& h->def_regular)
|
||||||
return _bfd_elf_allocate_ifunc_dyn_relocs (info, h, &eh->dyn_relocs,
|
return _bfd_elf_allocate_ifunc_dyn_relocs (info, h, &eh->dyn_relocs,
|
||||||
plt_entry_size, 4);
|
plt_entry_size,
|
||||||
|
plt_entry_size, 4);
|
||||||
else if (htab->elf.dynamic_sections_created
|
else if (htab->elf.dynamic_sections_created
|
||||||
&& h->plt.refcount > 0)
|
&& h->plt.refcount > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2260,6 +2260,7 @@ elf_x86_64_allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
|
||||||
return _bfd_elf_allocate_ifunc_dyn_relocs (info, h,
|
return _bfd_elf_allocate_ifunc_dyn_relocs (info, h,
|
||||||
&eh->dyn_relocs,
|
&eh->dyn_relocs,
|
||||||
plt_entry_size,
|
plt_entry_size,
|
||||||
|
plt_entry_size,
|
||||||
GOT_ENTRY_SIZE);
|
GOT_ENTRY_SIZE);
|
||||||
else if (htab->elf.dynamic_sections_created
|
else if (htab->elf.dynamic_sections_created
|
||||||
&& h->plt.refcount > 0)
|
&& h->plt.refcount > 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue