diff options
author | Alan Modra <amodra@gmail.com> | 2009-03-23 13:35:46 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2009-03-23 13:35:46 +0000 |
commit | ffcfec52d7a53942def890590b90d070f375a8bd (patch) | |
tree | 55e9d3998dca47393a7ac3c216d07b192ca28b60 /bfd/elf64-ppc.c | |
parent | 78e5cee6807fc377a8e77d05dd39aeaba8420d00 (diff) | |
download | gdb-ffcfec52d7a53942def890590b90d070f375a8bd.zip gdb-ffcfec52d7a53942def890590b90d070f375a8bd.tar.gz gdb-ffcfec52d7a53942def890590b90d070f375a8bd.tar.bz2 |
* elf64-ppc.c (synthetic_opd): Delete.
(compare_symbols): Look for .opd name rather than section match.
(ppc64_elf_get_synthetic_symtab): Likewise.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r-- | bfd/elf64-ppc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 1873728..ce82e16 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -2689,7 +2689,6 @@ get_opd_info (asection * sec) } /* Parameters for the qsort hook. */ -static asection *synthetic_opd; static bfd_boolean synthetic_relocatable; /* qsort comparison function for ppc64_elf_get_synthetic_symtab. */ @@ -2707,9 +2706,11 @@ compare_symbols (const void *ap, const void *bp) return 1; /* then .opd symbols. */ - if (a->section == synthetic_opd && b->section != synthetic_opd) + if (strcmp (a->section->name, ".opd") == 0 + && strcmp (b->section->name, ".opd") != 0) return -1; - if (a->section != synthetic_opd && b->section == synthetic_opd) + if (strcmp (a->section->name, ".opd") != 0 + && strcmp (b->section->name, ".opd") == 0) return 1; /* then other code symbols. */ @@ -2863,7 +2864,6 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd, else memcpy (syms, static_syms, (symcount + 1) * sizeof (*syms)); - synthetic_opd = opd; synthetic_relocatable = relocatable; qsort (syms, symcount, sizeof (*syms), compare_symbols); @@ -2881,7 +2881,7 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd, } i = 0; - if (syms[i]->section == opd) + if (strcmp (syms[i]->section->name, ".opd") == 0) ++i; codesecsym = i; @@ -2898,7 +2898,7 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd, secsymend = i; for (; i < symcount; ++i) - if (syms[i]->section != opd) + if (strcmp (syms[i]->section->name, ".opd") != 0) break; opdsymend = i; |