This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
fix 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 14:20:05 -0700
- Subject: fix Xtensa section size problem
- Organization: Tensilica, Inc.
The recent size changes exposed a latent issue in the Xtensa bfd port. The size
of an output section was being changed after placement. Apparently this was
harmless before, but now it triggers an error.
2004-06-29 Bob Wilson <bob.wilson@acm.org>
* elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
output section size.
Index: elf32-xtensa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-xtensa.c,v
retrieving revision 1.29
diff -u -p -r1.29 elf32-xtensa.c
--- elf32-xtensa.c 29 Jun 2004 13:46:33 -0000 1.29
+++ elf32-xtensa.c 29 Jun 2004 20:59:04 -0000
@@ -2277,10 +2277,7 @@ elf_xtensa_combine_prop_entries (output_
/* Clear the removed bytes. */
if ((bfd_size_type) (num * 8) < section_size)
- {
- memset (&contents[num * 8], 0, section_size - num * 8);
- sxtlit->size = num * 8;
- }
+ memset (&contents[num * 8], 0, section_size - num * 8);
if (! bfd_set_section_contents (output_bfd, sxtlit, contents, 0,
section_size))