+2009-03-23 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (synthetic_opd): Delete.
+ (compare_symbols): Look for .opd name rather than section match.
+ (ppc64_elf_get_synthetic_symtab): Likewise.
+
2009-03-21 Alan Modra <amodra@bigpond.net.au>
* elf32-ppc.c (is_pic_glink_stub): Delete.
}
\f
/* Parameters for the qsort hook. */
-static asection *synthetic_opd;
static bfd_boolean synthetic_relocatable;
/* qsort comparison function for ppc64_elf_get_synthetic_symtab. */
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. */
else
memcpy (syms, static_syms, (symcount + 1) * sizeof (*syms));
- synthetic_opd = opd;
synthetic_relocatable = relocatable;
qsort (syms, symcount, sizeof (*syms), compare_symbols);
}
i = 0;
- if (syms[i]->section == opd)
+ if (strcmp (syms[i]->section->name, ".opd") == 0)
++i;
codesecsym = i;
secsymend = i;
for (; i < symcount; ++i)
- if (syms[i]->section != opd)
+ if (strcmp (syms[i]->section->name, ".opd") != 0)
break;
opdsymend = i;