This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gas/write.c (subsegs_finish) change breaks alpha*-*-netbsd*


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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]