From: H.J. Lu Date: Tue, 20 Nov 2001 00:54:51 +0000 (+0000) Subject: 2001-11-19 H.J. Lu X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=45e9217a8f07fa3e927823eb095cc6fe94ca2f69;p=binutils-gdb.git 2001-11-19 H.J. Lu * elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when discarding relocations. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index b4d78291bcb..5d7dae175ab 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2001-11-19 H.J. Lu + + * elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when + discarding relocations. + 2001-11-19 Nick Clifton * section.c (bfd_is_const_section): New macro. Return true if the diff --git a/bfd/elflink.h b/bfd/elflink.h index 431d17ddf15..6b06bd0b658 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -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;