This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
fix another Xtensa section size problem
- From: Bob Wilson <bwilson at tensilica dot com>
- To: binutils at sources dot redhat dot com
- Date: Tue, 29 Jun 2004 15:04:50 -0700
- Subject: fix another Xtensa section size problem
- Organization: Tensilica, Inc.
This patch fixes another Xtensa section size problem. This one was exposed by
running the ld testsuite. Verified that the testsuite passes with this patch.
Committed on mainline.
2004-06-29 Bob Wilson <bob.wilson@acm.org>
* elf32-xtensa.c (elf_xtensa_relocate_section): Use
bfd_get_section_limit.
Index: elf32-xtensa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-xtensa.c,v
retrieving revision 1.30
diff -u -p -r1.30 elf32-xtensa.c
--- elf32-xtensa.c 29 Jun 2004 21:03:13 -0000 1.30
+++ elf32-xtensa.c 29 Jun 2004 21:57:32 -0000
@@ -1988,7 +1988,7 @@ elf_xtensa_relocate_section (output_bfd,
}
/* Sanity check the address. */
- if (rel->r_offset >= input_section->size
+ if (rel->r_offset >= bfd_get_section_limit (input_bfd, input_section)
&& ELF32_R_TYPE (rel->r_info) != R_XTENSA_NONE)
{
bfd_set_error (bfd_error_bad_value);