aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2004-09-02 04:43:36 +0000
committerAlan Modra <amodra@gmail.com>2004-09-02 04:43:36 +0000
commit595da8c56f4790e28301e9771073954395d118ef (patch)
treedb7fbb92dd88cc3f6bc375460085e990a9e5a5a4
parent14aaa6abcf59a37a4a1fec0c4d86d61f922d8ffd (diff)
downloadgdb-595da8c56f4790e28301e9771073954395d118ef.zip
gdb-595da8c56f4790e28301e9771073954395d118ef.tar.gz
gdb-595da8c56f4790e28301e9771073954395d118ef.tar.bz2
* elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
in when reading relocs, not our sorted syms. Remove unnecessary var.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf64-ppc.c18
2 files changed, 14 insertions, 10 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index d0069f7..0368d68 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2004-09-02 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
+ in when reading relocs, not our sorted syms. Remove unnecessary
+ var.
+
2004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
* elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 5adf219..77082ef 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -2688,7 +2688,7 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd,
synthetic_opd = opd;
synthetic_relocatable = relocatable;
- qsort (syms, symcount, sizeof (asymbol *), compare_symbols);
+ qsort (syms, symcount, sizeof (*syms), compare_symbols);
if (!relocatable && symcount > 1)
{
@@ -2741,26 +2741,24 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd,
arelent *r;
size_t size;
long relcount;
- asection *relopd;
slurp_relocs = get_elf_backend_data (abfd)->s->slurp_reloc_table;
- relopd = opd;
relcount = (opd->flags & SEC_RELOC) ? opd->reloc_count : 0;
if (! relcount
- || ! (*slurp_relocs) (abfd, relopd, syms, FALSE))
+ || ! (*slurp_relocs) (abfd, opd, static_syms, FALSE))
goto done;
size = 0;
- for (i = secsymend, r = relopd->relocation; i < opdsymend; ++i)
+ for (i = secsymend, r = opd->relocation; i < opdsymend; ++i)
{
asymbol *sym;
- while (r < relopd->relocation + relcount
+ while (r < opd->relocation + relcount
&& r->address < syms[i]->value + opd->vma)
++r;
- if (r == relopd->relocation + relcount)
+ if (r == opd->relocation + relcount)
break;
if (r->address != syms[i]->value + opd->vma)
@@ -2788,15 +2786,15 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd,
names = (char *) (s + count);
- for (i = secsymend, r = relopd->relocation; i < opdsymend; ++i)
+ for (i = secsymend, r = opd->relocation; i < opdsymend; ++i)
{
asymbol *sym;
- while (r < relopd->relocation + relcount
+ while (r < opd->relocation + relcount
&& r->address < syms[i]->value + opd->vma)
++r;
- if (r == relopd->relocation + relcount)
+ if (r == opd->relocation + relcount)
break;
if (r->address != syms[i]->value + opd->vma)