* elf64-ppc.c (ppc64_elf_edit_opd): Don't call dec_dynrel_count
authorAlan Modra <amodra@gmail.com>
Tue, 16 Aug 2005 10:13:43 +0000 (10:13 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 16 Aug 2005 10:13:43 +0000 (10:13 +0000)
when relocatable.

bfd/ChangeLog
bfd/elf64-ppc.c

index e26264d..5e17f89 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-16  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-ppc.c (ppc64_elf_edit_opd): Don't call dec_dynrel_count
+       when relocatable.
+
 2005-08-15  Bob Wilson  <bob.wilson@acm.org>
 
        * elf32-xtensa.c (ELF_MACHINE_CODE, ELF_MACHINE_ALT1): Swap values
index 545fae8..31ad3d0 100644 (file)
@@ -6461,8 +6461,9 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info,
 
              if (skip)
                {
-                 if (!dec_dynrel_count (rel->r_info, sec, info,
-                                        NULL, h, sym_sec))
+                 if (!info->relocatable
+                     && !dec_dynrel_count (rel->r_info, sec, info,
+                                           NULL, h, sym_sec))
                    goto error_ret;
                }
              else