mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:54:41 +08:00
* elf-bfd.h (enum elf_reloc_type_class): Add reloc_class_ifunc.
(struct elf_backend_data <elf_backed_reloc_type_class>): Add bfd_link_info* and asection* params. (_bfd_elf_reloc_type_class): Likewise. * elf.c (_bfd_elf_reloc_type_class): Likewise. * elflink.c (elf_link_sort_cmp2): Sort first on reloc class. (elf_link_sort_relocs): Update elf_backed_reloc_type_class call. * elf32-ppc.c (ppc_elf_reloc_type_class): Return reloc_class_ifunc for any reliplt reloc. Don't return reloc_class_plt for R_PPC_REL24 and R_PPC_ADDR24. * elf64-ppc.c (allocate_got): Formatting. (ppc64_elf_reloc_type_class): Return reloc_class_ifunc for any reliplt reloc. * elf-m10300.c, * elf32-arm.c, * elf32-bfin.c, * elf32-cr16.c, * elf32-cris.c, * elf32-hppa.c, * elf32-i386.c, * elf32-lm32.c, * elf32-m32r.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c, * elf32-s390.c, * elf32-sh.c, * elf32-sparc.c, * elf32-tilepro.c, * elf32-vax.c, * elf32-xtensa.c, * elf64-aarch64.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c, * elfnn-ia64.c, * elfxx-tilegx.c, * elfxx-tilegx.h: Add extra params to the various reloc_type_class functions.
This commit is contained in:
parent
0bed072fb1
commit
7e612e9848
@ -1,3 +1,27 @@
|
||||
2013-03-28 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* elf-bfd.h (enum elf_reloc_type_class): Add reloc_class_ifunc.
|
||||
(struct elf_backend_data <elf_backed_reloc_type_class>): Add
|
||||
bfd_link_info* and asection* params.
|
||||
(_bfd_elf_reloc_type_class): Likewise.
|
||||
* elf.c (_bfd_elf_reloc_type_class): Likewise.
|
||||
* elflink.c (elf_link_sort_cmp2): Sort first on reloc class.
|
||||
(elf_link_sort_relocs): Update elf_backed_reloc_type_class call.
|
||||
* elf32-ppc.c (ppc_elf_reloc_type_class): Return reloc_class_ifunc
|
||||
for any reliplt reloc. Don't return reloc_class_plt for
|
||||
R_PPC_REL24 and R_PPC_ADDR24.
|
||||
* elf64-ppc.c (allocate_got): Formatting.
|
||||
(ppc64_elf_reloc_type_class): Return reloc_class_ifunc for any
|
||||
reliplt reloc.
|
||||
* elf-m10300.c, * elf32-arm.c, * elf32-bfin.c, * elf32-cr16.c,
|
||||
* elf32-cris.c, * elf32-hppa.c, * elf32-i386.c, * elf32-lm32.c,
|
||||
* elf32-m32r.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c,
|
||||
* elf32-s390.c, * elf32-sh.c, * elf32-sparc.c, * elf32-tilepro.c,
|
||||
* elf32-vax.c, * elf32-xtensa.c, * elf64-aarch64.c, * elf64-alpha.c,
|
||||
* elf64-hppa.c, * elf64-ia64-vms.c, * elf64-s390.c, * elf64-sparc.c,
|
||||
* elf64-x86-64.c, * elfnn-ia64.c, * elfxx-tilegx.c, * elfxx-tilegx.h:
|
||||
Add extra params to the various reloc_type_class functions.
|
||||
|
||||
2013-03-27 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* elf32-ppc.c (ppc_elf_check_relocs): Set PLT_IFUNC in local got
|
||||
|
@ -641,7 +641,8 @@ enum elf_reloc_type_class {
|
||||
reloc_class_normal,
|
||||
reloc_class_relative,
|
||||
reloc_class_plt,
|
||||
reloc_class_copy
|
||||
reloc_class_copy,
|
||||
reloc_class_ifunc
|
||||
};
|
||||
|
||||
struct elf_reloc_cookie
|
||||
@ -1128,7 +1129,7 @@ struct elf_backend_data
|
||||
|
||||
/* This function returns class of a reloc type. */
|
||||
enum elf_reloc_type_class (*elf_backend_reloc_type_class)
|
||||
(const Elf_Internal_Rela *);
|
||||
(const struct bfd_link_info *, const asection *, const Elf_Internal_Rela *);
|
||||
|
||||
/* This function, if defined, removes information about discarded functions
|
||||
from other sections which mention them. */
|
||||
@ -1777,7 +1778,8 @@ extern bfd_boolean _bfd_elf_can_make_relative
|
||||
(bfd *input_bfd, struct bfd_link_info *info, asection *eh_frame_section);
|
||||
|
||||
extern enum elf_reloc_type_class _bfd_elf_reloc_type_class
|
||||
(const Elf_Internal_Rela *);
|
||||
(const struct bfd_link_info *, const asection *,
|
||||
const Elf_Internal_Rela *);
|
||||
extern bfd_vma _bfd_elf_rela_local_sym
|
||||
(bfd *, Elf_Internal_Sym *, asection **, Elf_Internal_Rela *);
|
||||
extern bfd_vma _bfd_elf_rel_local_sym
|
||||
|
@ -5532,7 +5532,9 @@ _bfd_mn10300_elf_finish_dynamic_sections (bfd * output_bfd,
|
||||
properly. */
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
_bfd_mn10300_elf_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
_bfd_mn10300_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) ELF32_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -9756,7 +9756,9 @@ bfd_get_elf_phdrs (bfd *abfd, void *phdrs)
|
||||
}
|
||||
|
||||
enum elf_reloc_type_class
|
||||
_bfd_elf_reloc_type_class (const Elf_Internal_Rela *rela ATTRIBUTE_UNUSED)
|
||||
_bfd_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return reloc_class_normal;
|
||||
}
|
||||
|
@ -14432,7 +14432,9 @@ elf32_arm_post_process_headers (bfd * abfd, struct bfd_link_info * link_info ATT
|
||||
}
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
elf32_arm_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
elf32_arm_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) ELF32_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -1301,7 +1301,9 @@ bfin_check_relocs (bfd * abfd,
|
||||
}
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
elf32_bfin_reloc_type_class (const Elf_Internal_Rela * rela)
|
||||
elf32_bfin_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela * rela)
|
||||
{
|
||||
switch ((int) ELF32_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -2916,7 +2916,9 @@ error_return:
|
||||
properly. */
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
_bfd_cr16_elf_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
_bfd_cr16_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) ELF32_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -4241,7 +4241,9 @@ cris_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
|
||||
}
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
elf_cris_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
elf_cris_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
enum elf_cris_reloc_type r_type = ELF32_R_TYPE (rela->r_info);
|
||||
switch (r_type)
|
||||
|
@ -4436,7 +4436,9 @@ elf32_hppa_finish_dynamic_symbol (bfd *output_bfd,
|
||||
dynamic linker, before writing them out. */
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
elf32_hppa_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
elf32_hppa_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
/* Handle TLS relocs first; we don't want them to be marked
|
||||
relative by the "if (ELF32_R_SYM (rela->r_info) == STN_UNDEF)"
|
||||
|
@ -4718,7 +4718,9 @@ elf_i386_finish_local_dynamic_symbol (void **slot, void *inf)
|
||||
dynamic linker, before writing them out. */
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
elf_i386_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
elf_i386_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch (ELF32_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -1741,7 +1741,9 @@ lm32_elf_finish_dynamic_symbol (bfd *output_bfd,
|
||||
}
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
lm32_elf_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
lm32_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) ELF32_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -3981,7 +3981,9 @@ static const struct bfd_elf_special_section m32r_elf_special_sections[] =
|
||||
};
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
m32r_elf_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
m32r_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) ELF32_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -4737,7 +4737,9 @@ bfd_elf_m68k_set_target_options (struct bfd_link_info *info, int got_handling)
|
||||
}
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
elf32_m68k_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
elf32_m68k_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) ELF32_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -3257,7 +3257,9 @@ elf_metag_post_process_headers (bfd * abfd, struct bfd_link_info * link_info ATT
|
||||
dynamic linker, before writing them out. */
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
elf_metag_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
elf_metag_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) ELF32_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -3977,7 +3977,9 @@ nios2_elf32_link_hash_table_create (bfd *abfd)
|
||||
|
||||
/* Implement elf_backend_reloc_type_class. */
|
||||
static enum elf_reloc_type_class
|
||||
nios2_elf32_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
nios2_elf32_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) ELF32_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -9362,14 +9362,19 @@ ppc_elf_finish_dynamic_symbol (bfd *output_bfd,
|
||||
}
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
ppc_elf_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
ppc_elf_reloc_type_class (const struct bfd_link_info *info,
|
||||
const asection *rel_sec,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
struct ppc_elf_link_hash_table *htab = ppc_elf_hash_table (info);
|
||||
|
||||
if (rel_sec == htab->reliplt)
|
||||
return reloc_class_ifunc;
|
||||
|
||||
switch (ELF32_R_TYPE (rela->r_info))
|
||||
{
|
||||
case R_PPC_RELATIVE:
|
||||
return reloc_class_relative;
|
||||
case R_PPC_REL24:
|
||||
case R_PPC_ADDR24:
|
||||
case R_PPC_JMP_SLOT:
|
||||
return reloc_class_plt;
|
||||
case R_PPC_COPY:
|
||||
|
@ -3712,7 +3712,9 @@ elf_s390_finish_dynamic_symbol (bfd *output_bfd,
|
||||
dynamic linker, before writing them out. */
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
elf_s390_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
elf_s390_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) ELF32_R_TYPE (rela->r_info))
|
||||
{
|
||||
@ -3940,7 +3942,6 @@ elf32_s390_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
|
||||
#define elf_backend_relocate_section elf_s390_relocate_section
|
||||
#define elf_backend_size_dynamic_sections elf_s390_size_dynamic_sections
|
||||
#define elf_backend_init_index_section _bfd_elf_init_1_index_section
|
||||
#define elf_backend_reloc_type_class elf_s390_reloc_type_class
|
||||
#define elf_backend_grok_prstatus elf_s390_grok_prstatus
|
||||
#define elf_backend_plt_sym_val elf_s390_plt_sym_val
|
||||
#define elf_backend_add_symbol_hook elf_s390_add_symbol_hook
|
||||
|
@ -7261,7 +7261,9 @@ sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
|
||||
}
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
sh_elf_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
sh_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) ELF32_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -153,7 +153,9 @@ elf32_sparc_final_write_processing (bfd *abfd,
|
||||
}
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
elf32_sparc_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
elf32_sparc_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) ELF32_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -3964,7 +3964,9 @@ tilepro_elf_plt_sym_val (bfd_vma i, const asection *plt,
|
||||
}
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
tilepro_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
tilepro_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) ELF32_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -2026,7 +2026,9 @@ elf_vax_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
|
||||
}
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
elf_vax_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
elf_vax_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) ELF32_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -3585,7 +3585,9 @@ elf_xtensa_final_write_processing (bfd *abfd,
|
||||
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
elf_xtensa_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
elf_xtensa_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) ELF32_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -5560,7 +5560,9 @@ elf64_aarch64_post_process_headers (bfd *abfd,
|
||||
}
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
elf64_aarch64_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
elf64_aarch64_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) ELF64_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -5315,7 +5315,9 @@ elf64_alpha_final_link (bfd *abfd, struct bfd_link_info *info)
|
||||
}
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
elf64_alpha_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
elf64_alpha_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) ELF64_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -194,9 +194,6 @@ static bfd_boolean elf64_hppa_finish_dynamic_symbol
|
||||
(bfd *, struct bfd_link_info *,
|
||||
struct elf_link_hash_entry *, Elf_Internal_Sym *);
|
||||
|
||||
static enum elf_reloc_type_class elf64_hppa_reloc_type_class
|
||||
(const Elf_Internal_Rela *);
|
||||
|
||||
static bfd_boolean elf64_hppa_finish_dynamic_sections
|
||||
(bfd *, struct bfd_link_info *);
|
||||
|
||||
@ -2446,7 +2443,9 @@ elf64_hppa_finalize_dynreloc (struct elf_link_hash_entry *eh,
|
||||
dynamic linker, before writing them out. */
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
elf64_hppa_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
elf64_hppa_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
if (ELF64_R_SYM (rela->r_info) == STN_UNDEF)
|
||||
return reloc_class_relative;
|
||||
|
@ -4310,7 +4310,9 @@ elf64_ia64_print_private_bfd_data (bfd *abfd, void * ptr)
|
||||
}
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
elf64_ia64_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
elf64_ia64_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) ELF64_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -8816,8 +8816,8 @@ allocate_got (struct elf_link_hash_entry *h,
|
||||
dyn = htab->elf.dynamic_sections_created;
|
||||
if ((info->shared
|
||||
|| WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h))
|
||||
&& (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|
||||
|| h->root.type != bfd_link_hash_undefweak))
|
||||
&& (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|
||||
|| h->root.type != bfd_link_hash_undefweak))
|
||||
{
|
||||
asection *relgot = ppc64_elf_tdata (gent->owner)->relgot;
|
||||
relgot->size += rentsize;
|
||||
@ -14062,9 +14062,15 @@ ppc64_elf_finish_dynamic_symbol (bfd *output_bfd,
|
||||
dynamic linker, before writing them out. */
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
ppc64_elf_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
ppc64_elf_reloc_type_class (const struct bfd_link_info *info,
|
||||
const asection *rel_sec,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
enum elf_ppc64_reloc_type r_type;
|
||||
struct ppc_link_hash_table *htab = ppc_hash_table (info);
|
||||
|
||||
if (rel_sec == htab->reliplt)
|
||||
return reloc_class_ifunc;
|
||||
|
||||
r_type = ELF64_R_TYPE (rela->r_info);
|
||||
switch (r_type)
|
||||
|
@ -3516,7 +3516,9 @@ do_glob_dat:
|
||||
dynamic linker, before writing them out. */
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
elf_s390_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
elf_s390_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) ELF64_R_TYPE (rela->r_info))
|
||||
{
|
||||
@ -3752,7 +3754,6 @@ const struct elf_size_info s390_elf64_size_info =
|
||||
#define elf_backend_relocate_section elf_s390_relocate_section
|
||||
#define elf_backend_size_dynamic_sections elf_s390_size_dynamic_sections
|
||||
#define elf_backend_init_index_section _bfd_elf_init_1_index_section
|
||||
#define elf_backend_reloc_type_class elf_s390_reloc_type_class
|
||||
#define elf_backend_plt_sym_val elf_s390_plt_sym_val
|
||||
#define elf_backend_add_symbol_hook elf_s390_add_symbol_hook
|
||||
|
||||
|
@ -765,7 +765,9 @@ elf64_sparc_print_symbol_all (bfd *abfd ATTRIBUTE_UNUSED, void * filep,
|
||||
}
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
elf64_sparc_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
elf64_sparc_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) ELF64_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -4666,7 +4666,9 @@ elf_x86_64_finish_local_dynamic_symbol (void **slot, void *inf)
|
||||
dynamic linker, before writing them out. */
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
elf_x86_64_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
elf_x86_64_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) ELF32_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -8097,18 +8097,15 @@ elf_link_sort_cmp2 (const void *A, const void *B)
|
||||
{
|
||||
const struct elf_link_sort_rela *a = (const struct elf_link_sort_rela *) A;
|
||||
const struct elf_link_sort_rela *b = (const struct elf_link_sort_rela *) B;
|
||||
int copya, copyb;
|
||||
|
||||
if (a->type < b->type)
|
||||
return -1;
|
||||
if (a->type > b->type)
|
||||
return 1;
|
||||
if (a->u.offset < b->u.offset)
|
||||
return -1;
|
||||
if (a->u.offset > b->u.offset)
|
||||
return 1;
|
||||
copya = (a->type == reloc_class_copy) * 2 + (a->type == reloc_class_plt);
|
||||
copyb = (b->type == reloc_class_copy) * 2 + (b->type == reloc_class_plt);
|
||||
if (copya < copyb)
|
||||
return -1;
|
||||
if (copya > copyb)
|
||||
return 1;
|
||||
if (a->rela->r_offset < b->rela->r_offset)
|
||||
return -1;
|
||||
if (a->rela->r_offset > b->rela->r_offset)
|
||||
@ -8334,7 +8331,7 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
|
||||
struct elf_link_sort_rela *s = (struct elf_link_sort_rela *) p;
|
||||
|
||||
(*swap_in) (abfd, erel, s->rela);
|
||||
s->type = (*bed->elf_backend_reloc_type_class) (s->rela);
|
||||
s->type = (*bed->elf_backend_reloc_type_class) (info, o, s->rela);
|
||||
s->u.sym_mask = r_sym_mask;
|
||||
p += sort_elt;
|
||||
erel += ext_size;
|
||||
|
@ -4808,7 +4808,9 @@ elfNN_ia64_print_private_bfd_data (bfd *abfd, void * ptr)
|
||||
}
|
||||
|
||||
static enum elf_reloc_type_class
|
||||
elfNN_ia64_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
elfNN_ia64_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) ELFNN_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -4370,7 +4370,9 @@ tilegx_elf_plt_sym_val (bfd_vma i, const asection *plt,
|
||||
}
|
||||
|
||||
enum elf_reloc_type_class
|
||||
tilegx_reloc_type_class (const Elf_Internal_Rela *rela)
|
||||
tilegx_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
|
||||
const asection *rel_sec ATTRIBUTE_UNUSED,
|
||||
const Elf_Internal_Rela *rela)
|
||||
{
|
||||
switch ((int) TILEGX_ELF_R_TYPE (rela->r_info))
|
||||
{
|
||||
|
@ -22,7 +22,9 @@
|
||||
#include "elf/internal.h"
|
||||
|
||||
extern enum elf_reloc_type_class
|
||||
tilegx_reloc_type_class (const Elf_Internal_Rela *);
|
||||
tilegx_reloc_type_class (const struct bfd_link_info *,
|
||||
const asection *,
|
||||
const Elf_Internal_Rela *);
|
||||
|
||||
extern reloc_howto_type *
|
||||
tilegx_reloc_name_lookup (bfd *, const char *);
|
||||
|
Loading…
Reference in New Issue
Block a user