DJ Delorie <dj@redhat.com> writes:
> > However, this should be fixed - its clearly not following the spec.
> > /cr/lf/null != /r/n
>
> Ok, then, what is it? CR = carriage return = '\r' in C, LF = line
> feed = '\n' in C (at least in binary mode, which bfd uses). The only
> change it seems you're proposing is adding a NUL byte after each LF.
> (but NULL is not the same as NUL).
Of course, that doesn't make much sense in context, since dos2unix
wouldn't fix add a NUL character.
I think the only reasonable way to interpret that suggestion is that
each line should end in exactly one of
CR (ASCII 13)
LR (ASCII 10)
NULL (presumably ASCII 0)
Of course that would not generate a normal text file on DOS. That
sounds like a change which would break backward compatibility in a bad
way.
An alternative, which would also not follow the suggested spec, would
be to generate S-records as a text file appropriate for the particular
host. Of course, that would be a pain in other ways, since BFD
currently always generate binary files.