This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] Fixes for iq2000 reloc generation
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: Thu, 28 Oct 2004 11:01:55 +0100
- Subject: [PATCH] Fixes for iq2000 reloc generation
Hi Guys,
I am applying the patch below to fix a couple of bugs with reloc
handling for the iq2000-elf port. The first was that final reloc
processing was being performed even during a relocatable link and
the second was that elf_bad_symtab was being set to true for no good
reason at all.
Cheers
Nick
bfd/ChangeLog
2004-10-28 Nick Clifton <nickc@redhat.com>
* elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
performing a relocatable link.
(iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
for MIPS ports under Irix.
Index: bfd/elf32-iq2000.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-iq2000.c,v
retrieving revision 1.7
diff -c -3 -p -r1.7 elf32-iq2000.c
*** bfd/elf32-iq2000.c 21 Oct 2004 15:28:23 -0000 1.7
--- bfd/elf32-iq2000.c 28 Oct 2004 09:50:19 -0000
*************** iq2000_elf_relocate_section (output_bfd,
*** 568,573 ****
--- 568,576 ----
Elf_Internal_Rela * rel;
Elf_Internal_Rela * relend;
+ if (info->relocatable)
+ return TRUE;
+
symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
relend = relocs + input_section->reloc_count;
*************** bfd_boolean
*** 915,925 ****
iq2000_elf_object_p (abfd)
bfd *abfd;
{
- /* Irix 5 and 6 is broken. Object file symbol tables are not always
- sorted correctly such that local symbols precede global symbols,
- and the sh_info field in the symbol table is not always right. */
- elf_bad_symtab (abfd) = TRUE;
-
bfd_default_set_arch_mach (abfd, bfd_arch_iq2000,
elf32_iq2000_machine (abfd));
return TRUE;
--- 918,923 ----