mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 20:28:28 +08:00
* elf32-ppc.c (ppc_elf_check_relocs): Remove dead ifunc code.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2010-02-08 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* elf32-ppc.c (ppc_elf_check_relocs): Remove dead ifunc code.
|
||||||
|
|
||||||
2010-02-05 Sterling Augustine <sterling@tensilica.com>
|
2010-02-05 Sterling Augustine <sterling@tensilica.com>
|
||||||
|
|
||||||
* elf.c (assign_file_positions_for_load_sections) Update lma of
|
* elf.c (assign_file_positions_for_load_sections) Update lma of
|
||||||
|
@ -3447,7 +3447,6 @@ ppc_elf_check_relocs (bfd *abfd,
|
|||||||
enum elf_ppc_reloc_type r_type;
|
enum elf_ppc_reloc_type r_type;
|
||||||
struct elf_link_hash_entry *h;
|
struct elf_link_hash_entry *h;
|
||||||
int tls_type;
|
int tls_type;
|
||||||
struct plt_entry **ifunc;
|
|
||||||
|
|
||||||
r_symndx = ELF32_R_SYM (rel->r_info);
|
r_symndx = ELF32_R_SYM (rel->r_info);
|
||||||
if (r_symndx < symtab_hdr->sh_info)
|
if (r_symndx < symtab_hdr->sh_info)
|
||||||
@ -3475,46 +3474,38 @@ ppc_elf_check_relocs (bfd *abfd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
tls_type = 0;
|
tls_type = 0;
|
||||||
ifunc = NULL;
|
|
||||||
r_type = ELF32_R_TYPE (rel->r_info);
|
r_type = ELF32_R_TYPE (rel->r_info);
|
||||||
if (!htab->is_vxworks)
|
if (h == NULL && !htab->is_vxworks)
|
||||||
{
|
{
|
||||||
if (h != NULL)
|
Elf_Internal_Sym *isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
||||||
|
abfd, r_symndx);
|
||||||
|
if (isym == NULL)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC
|
||||||
|
&& (!info->shared
|
||||||
|
|| is_branch_reloc (r_type)))
|
||||||
{
|
{
|
||||||
if (h->type == STT_GNU_IFUNC)
|
struct plt_entry **ifunc;
|
||||||
ifunc = &h->plt.plist;
|
bfd_vma addend;
|
||||||
}
|
|
||||||
else
|
ifunc = update_local_sym_info (abfd, symtab_hdr, r_symndx,
|
||||||
{
|
PLT_IFUNC);
|
||||||
Elf_Internal_Sym *isym = bfd_sym_from_r_symndx (&htab->sym_cache,
|
if (ifunc == NULL)
|
||||||
abfd, r_symndx);
|
|
||||||
if (isym == NULL)
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC
|
/* STT_GNU_IFUNC symbols must have a PLT entry;
|
||||||
&& (!info->shared
|
In a non-pie executable even when there are
|
||||||
|| is_branch_reloc (r_type)))
|
no plt calls. */
|
||||||
|
addend = 0;
|
||||||
|
if (r_type == R_PPC_PLTREL24)
|
||||||
{
|
{
|
||||||
bfd_vma addend;
|
ppc_elf_tdata (abfd)->makes_plt_call = 1;
|
||||||
|
if (info->shared)
|
||||||
ifunc = update_local_sym_info (abfd, symtab_hdr, r_symndx,
|
addend = rel->r_addend;
|
||||||
PLT_IFUNC);
|
|
||||||
if (ifunc == NULL)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
/* STT_GNU_IFUNC symbols must have a PLT entry;
|
|
||||||
In a non-pie executable even when there are
|
|
||||||
no plt calls. */
|
|
||||||
addend = 0;
|
|
||||||
if (r_type == R_PPC_PLTREL24)
|
|
||||||
{
|
|
||||||
ppc_elf_tdata (abfd)->makes_plt_call = 1;
|
|
||||||
if (info->shared)
|
|
||||||
addend = rel->r_addend;
|
|
||||||
}
|
|
||||||
if (!update_plt_info (abfd, ifunc, got2, addend))
|
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
if (!update_plt_info (abfd, ifunc, got2, addend))
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user