* elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
authorAlan Modra <amodra@gmail.com>
Wed, 7 Aug 2002 05:23:09 +0000 (05:23 +0000)
committerAlan Modra <amodra@gmail.com>
Wed, 7 Aug 2002 05:23:09 +0000 (05:23 +0000)
entries.

bfd/ChangeLog
bfd/elf64-ppc.c

index 3d9e2b0d767e37bd24159d0875df07ddf6860e8d..e3ada44c420867def3a040edb0d989f242d5ba31 100644 (file)
@@ -1,3 +1,8 @@
+2002-08-07  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
+       entries.
+
 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
 
        * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
index 86161fcb05fa2263623916985188593be7d27bc8..616fbd496afc41f0b9688dec116098fe46501469 100644 (file)
@@ -3753,7 +3753,23 @@ edit_opd (obfd, info)
                    }
 
                  skip = sym_sec->output_section == bfd_abs_section_ptr;
-                 if (!skip)
+                 if (skip)
+                   {
+                     if (h != NULL)
+                       {
+                         /* Arrange for the function descriptor sym
+                            to be dropped.  */
+                         struct elf_link_hash_entry *fdh;
+                         struct ppc_link_hash_entry *fh;
+
+                         fh = (struct ppc_link_hash_entry *) h;
+                         BFD_ASSERT (fh->is_func);
+                         fdh = fh->oh;
+                         fdh->root.u.def.value = 0;
+                         fdh->root.u.def.section = sym_sec;
+                       }
+                   }
+                 else
                    {
                      /* We'll be keeping this opd entry.  */