From: ths Date: Tue, 25 Jul 2006 09:06:05 +0000 (+0000) Subject: * elfxx-mips.c (mips_elf_next_relocation): Tighten check to test X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=b3daa64acc7bbf3fc0ca959838cd340456340b49;p=pf3gnuchains%2Fpf3gnuchains3x.git * elfxx-mips.c (mips_elf_next_relocation): Tighten check to test also for same symbol. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 86517d6678..f23d35b85e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2006-07-25 Thiemo Seufer + + * elfxx-mips.c (mips_elf_next_relocation): Tighten check to test + also for same symbol. + 2006-07-25 Thiemo Seufer * elfxx-mips.c (mips_elf_calculate_relocation): Remove magic constant. diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index f917ba538f..5a65d42461 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -3583,9 +3583,12 @@ mips_elf_next_relocation (bfd *abfd ATTRIBUTE_UNUSED, unsigned int r_type, const Elf_Internal_Rela *relocation, const Elf_Internal_Rela *relend) { + unsigned long r_symndx = ELF_R_SYM (abfd, relocation->r_info); + while (relocation < relend) { - if (ELF_R_TYPE (abfd, relocation->r_info) == r_type) + if (ELF_R_TYPE (abfd, relocation->r_info) == r_type + && ELF_R_SYM (abfd, relocation->r_info) == r_symndx) return relocation; ++relocation;