This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
gas/write.c (subsegs_finish) change breaks alpha*-*-netbsd*
- From: Jason R Thorpe <thorpej at wasabisystems dot com>
- To: amodra at bigpond dot net dot au
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 22 May 2002 14:49:24 -0700
- Subject: gas/write.c (subsegs_finish) change breaks alpha*-*-netbsd*
- Organization: Wasabi Systems, Inc.
Hi Alan...
This change:
2002-05-13 Alan Modra <amodra@bigpond.net.au>
* write.c (subsegs_finish): Don't specially align last subseg.
...broke gas on the alpha*-*-netbsd* target. I noticed it while doing
a gcc-current bootstrap. Trying to assemble the offending .s file by
hand yields:
libgcc2.s: Assembler messages:
libgcc2.s:2990: Fatal error: cannot write to output file
What happens is that bfd_set_section_contents() is being called with
an offset and count larger than sz, so the following check in that
function trips:
sz = bfd_get_section_size_now (abfd, section);
if ((bfd_size_type) offset > sz
|| count > sz
|| offset + count > sz
|| count != (size_t) count)
{
bfd_set_error (bfd_error_bad_value);
return false;
}
Reverting that change fixes the problem for me.
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>