This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
another small tweak for Xtensa BFD
- From: Bob Wilson <bwilson at tensilica dot com>
- To: binutils at sources dot redhat dot com
- Date: Fri, 05 Oct 2007 11:20:44 -0700
- Subject: another small tweak for Xtensa BFD
The "do_fix_for_*_link" functions in elf32-xtensa.c no longer modify the
relocation type. This patch removes the unnecessary code to update r_type
and/or the howto pointer after calling those functions. Committed on trunk.
2007-10-05 Bob Wilson <bob.wilson@acm.org>
* elf32-xtensa.c (elf_xtensa_relocate_section): Remove updates of
r_type and howto after calling do_fix_for_relocateable_link and
do_fix_for_final_link.
Index: elf32-xtensa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-xtensa.c,v
retrieving revision 1.97
diff -u -p -r1.97 elf32-xtensa.c
--- elf32-xtensa.c 5 Oct 2007 18:09:57 -0000 1.97
+++ elf32-xtensa.c 5 Oct 2007 18:14:06 -0000
@@ -2095,7 +2095,6 @@ elf_xtensa_relocate_section (bfd *output
if (!do_fix_for_relocatable_link (rel, input_bfd, input_section,
contents))
return FALSE;
- r_type = ELF32_R_TYPE (rel->r_info);
}
if (r_type == R_XTENSA_ASM_SIMPLIFY)
@@ -2165,10 +2164,6 @@ elf_xtensa_relocate_section (bfd *output
/* Check if this references a section in another input file. */
do_fix_for_final_link (rel, input_bfd, input_section, contents,
&relocation);
-
- /* Update some already cached values. */
- r_type = ELF32_R_TYPE (rel->r_info);
- howto = &elf_howto_table[r_type];
}
/* Sanity check the address. */