FW: Re: Why is my executabel in DOS file format?

Ian Lance Taylor ian@wasabisystems.com
Tue Mar 2 14:51:00 GMT 2004


"Meg Abyte" <fitter20@hotmail.com> writes:

>   I have compile the GNU GCC tools for the Motorola MCORE
> microprocessor on a RH
> linux system. However, when I make the executabel (.s19) using the
> GNU linker, it
> produces it in a DOS file format. Meaning the file has carriage
> return and line feed. I then have to go and strip this out to ONLY
> contain just the line feed.
> 
>   Is there an option or way to get the linker to not create this
> file in a DOS format?

Details always help.  In this case I assume that you are invoking the
linker with --oformat srec.

If that is indeed what you are doing, then note that S-record files
are not text files.  They follow a specific binary format which
happens to be more or less human-readable.  That format calls for each
line to end with \r\n, which is indeed DOS file format for a text
file.  This specific binary format is expected by various tools which
use S-records, including hardware such as EEPROM programmers.

There is no option to generate S-record files which use only \n.

If you are doing something else, then let us know what you are doing.

Ian



More information about the Binutils mailing list