2001-11-19 H.J. Lu <hjl@gnu.org>
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 20 Nov 2001 00:54:51 +0000 (00:54 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 20 Nov 2001 00:54:51 +0000 (00:54 +0000)
* elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
discarding relocations.

bfd/ChangeLog
bfd/elflink.h

index b4d78291bcb5cbcb71910b00e28fb82abca69c86..5d7dae175abc65810b7776541c8e30439aec97af 100644 (file)
@@ -1,3 +1,8 @@
+2001-11-19  H.J. Lu  <hjl@gnu.org>
+
+       * elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
+       discarding relocations.
+
 2001-11-19  Nick Clifton  <nickc@cambridge.redhat.com>
 
        * section.c (bfd_is_const_section): New macro.  Return true if the
index 431d17ddf15d9ded0d987c91d0310e8b52273e98..6b06bd0b6586ed1339ef1674feb5a833c70026ee 100644 (file)
@@ -6328,6 +6328,7 @@ elf_link_input_bfd (finfo, input_bfd)
                                 _("warning: relocation against removed section; zeroing"),
                                 NULL, input_bfd, o, rel->r_offset);
 #endif
+                             BFD_ASSERT (r_symndx != 0);
                              memset (rel, 0, sizeof (*rel));
                            }
                          else
@@ -6359,6 +6360,7 @@ elf_link_input_bfd (finfo, input_bfd)
                                 _("warning: relocation against removed section"),
                                 NULL, input_bfd, o, rel->r_offset);
 #endif
+                             BFD_ASSERT (r_symndx != 0);
                              rel->r_info
                                = ELF_R_INFO (0, ELF_R_TYPE (rel->r_info));
                              rel->r_addend = 0;