This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
MIPS: remove garbage from elf64 REL32 relocations
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: 04 Oct 2002 05:58:20 -0300
- Subject: MIPS: remove garbage from elf64 REL32 relocations
- Organization: GCC Team, Red Hat
The two other relocation types packed together with a REL32 relocation
in ELF64 are not initialized, so their corresponding type fields end
up with garbage. This patch fixes this. Ok to install?
Index: bfd/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
of the other two relocations packed with a REL32 to NONE.
Index: bfd/elfxx-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-mips.c,v
retrieving revision 1.24
diff -u -p -r1.24 elfxx-mips.c
--- bfd/elfxx-mips.c 30 Sep 2002 11:53:56 -0000 1.24
+++ bfd/elfxx-mips.c 4 Oct 2002 08:29:59 -0000
@@ -2938,6 +2938,10 @@ mips_elf_create_dynamic_relocation (outp
know where the shared library will wind up at load-time. */
outrel[0].r_info = ELF_R_INFO (output_bfd, (unsigned long) indx,
R_MIPS_REL32);
+ outrel[1].r_info = ELF_R_INFO (output_bfd, (unsigned long) 0,
+ R_MIPS_NONE);
+ outrel[2].r_info = ELF_R_INFO (output_bfd, (unsigned long) 0,
+ R_MIPS_NONE);
/* Adjust the output offset of the relocation to reference the
correct location in the output file. */
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer