This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Remove incorrect Xtensa BFD assertion
- From: Bob Wilson <bwilson at tensilica dot com>
- To: binutils at sources dot redhat dot com
- Date: Wed, 22 Mar 2006 13:48:51 -0800
- Subject: Remove incorrect Xtensa BFD assertion
This patch removes an assertion that is no longer true. When the
xtensa_read_table_entries function is called after linker relaxation, some of
the relocations on the table may have their r_addend fields set to negative
values to account for text-section literals that have been coalesced. Tested
and committed on the mainline.
2006-03-22 Bob Wilson <bob.wilson@acm.org>
* elf32-xtensa.c (xtensa_read_table_entries): Remove assertion that
rel->r_addend is zero.
Index: elf32-xtensa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-xtensa.c,v
retrieving revision 1.62
diff -u -p -r1.62 elf32-xtensa.c
--- elf32-xtensa.c 27 Feb 2006 08:48:28 -0000 1.62
+++ elf32-xtensa.c 22 Mar 2006 21:43:15 -0000
@@ -640,7 +640,6 @@ xtensa_read_table_entries (bfd *abfd,
{
bfd_vma sym_off = get_elf_r_symndx_offset (abfd, r_symndx);
BFD_ASSERT (sym_off == 0);
- BFD_ASSERT (rel->r_addend == 0);
blocks[block_count].address =
(section_addr + sym_off + rel->r_addend
+ bfd_get_32 (abfd, table_data + rel->r_offset));