* elf64-ppc.c (synthetic_opd): Delete.
authorAlan Modra <amodra@gmail.com>
Mon, 23 Mar 2009 13:35:46 +0000 (13:35 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 23 Mar 2009 13:35:46 +0000 (13:35 +0000)
(compare_symbols): Look for .opd name rather than section match.
(ppc64_elf_get_synthetic_symtab): Likewise.

bfd/ChangeLog
bfd/elf64-ppc.c

index 5e1a07d9c6149f215210aa558e881f6d799dd918..9dfb87ed6bbaf5449a31fd8dbeb6183009b39a36 100644 (file)
@@ -1,3 +1,9 @@
+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.
index 1873728f38e83588ae067952172b664249b79740..ce82e1601523f292013715ce2e541894d286abf7 100644 (file)
@@ -2689,7 +2689,6 @@ get_opd_info (asection * sec)
 }
 \f
 /* 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;
 
This page took 0.03344 seconds and 4 git commands to generate.