gas/write.c (subsegs_finish) change breaks alpha*-*-netbsd*
Jason R Thorpe
thorpej@wasabisystems.com
Wed May 22 14:49:00 GMT 2002
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>
More information about the Binutils
mailing list