* elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't attempt to
read plt relocs if no dynamic syms.
This commit is contained in:
parent
0396d01779
commit
066ee829b9
|
@ -1,3 +1,8 @@
|
||||||
|
2008-10-09 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't attempt to
|
||||||
|
read plt relocs if no dynamic syms.
|
||||||
|
|
||||||
2008-10-08 Nick Clifton <nickc@redhat.com>
|
2008-10-08 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* configure.in (ALL_LINGUAS): Add "id".
|
* configure.in (ALL_LINGUAS): Add "id".
|
||||||
|
|
|
@ -3005,8 +3005,8 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get start of .glink stubs from DT_PPC64_GLINK. */
|
/* Get start of .glink stubs from DT_PPC64_GLINK. */
|
||||||
dynamic = bfd_get_section_by_name (abfd, ".dynamic");
|
if (dyn_count != 0
|
||||||
if (dynamic != NULL)
|
&& (dynamic = bfd_get_section_by_name (abfd, ".dynamic")) != NULL)
|
||||||
{
|
{
|
||||||
bfd_byte *dynbuf, *extdyn, *extdynend;
|
bfd_byte *dynbuf, *extdyn, *extdynend;
|
||||||
size_t extdynsize;
|
size_t extdynsize;
|
||||||
|
@ -3061,21 +3061,21 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd,
|
||||||
|
|
||||||
if (resolv_vma)
|
if (resolv_vma)
|
||||||
size += sizeof (asymbol) + sizeof ("__glink_PLTresolve");
|
size += sizeof (asymbol) + sizeof ("__glink_PLTresolve");
|
||||||
}
|
|
||||||
|
|
||||||
relplt = bfd_get_section_by_name (abfd, ".rela.plt");
|
relplt = bfd_get_section_by_name (abfd, ".rela.plt");
|
||||||
if (glink != NULL && relplt != NULL)
|
if (relplt != NULL)
|
||||||
{
|
{
|
||||||
slurp_relocs = get_elf_backend_data (abfd)->s->slurp_reloc_table;
|
slurp_relocs = get_elf_backend_data (abfd)->s->slurp_reloc_table;
|
||||||
if (! (*slurp_relocs) (abfd, relplt, dyn_syms, TRUE))
|
if (! (*slurp_relocs) (abfd, relplt, dyn_syms, TRUE))
|
||||||
goto free_contents_and_exit;
|
goto free_contents_and_exit;
|
||||||
|
|
||||||
plt_count = relplt->size / sizeof (Elf64_External_Rela);
|
plt_count = relplt->size / sizeof (Elf64_External_Rela);
|
||||||
size += plt_count * sizeof (asymbol);
|
size += plt_count * sizeof (asymbol);
|
||||||
|
|
||||||
p = relplt->relocation;
|
p = relplt->relocation;
|
||||||
for (i = 0; i < plt_count; i++, p++)
|
for (i = 0; i < plt_count; i++, p++)
|
||||||
size += strlen ((*p->sym_ptr_ptr)->name) + sizeof ("@plt");
|
size += strlen ((*p->sym_ptr_ptr)->name) + sizeof ("@plt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s = *ret = bfd_malloc (size);
|
s = *ret = bfd_malloc (size);
|
||||||
|
|
Loading…
Reference in New Issue