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

See the CrossGCC FAQ for lots more information.


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

Re: "-oformat=srec" not working


> I have a cross-compile tool chain working on a Slackware Linux box and have
> ported it to Darwin (Mac OS X 10.1.5).
> 
> I have everything working except the linker is not converting the output to
> a Motorola S-record format like it does on the Linux box.  In particular,
> the output remains in binary, rather than an ASCII S-record.
> 
> Here is the line that is executing:
> 
> ld -oformat=srec -v -T app-rom.ld  \
>         -Map ../../obj/app-ug7.x.map  \
>         -o ../../bin/app-ug7.x <followed by a list of object files and
> libraries>
> 
> The -oformat=srec is what seems to be getting ignored by the linker.  There
> are no errors produced.

Is that one or two dashes before the oformat?  According to the manpage for
ld, the oformat argument needs to be introduced by two dashes.  If you've
only used one, it's probably being interpreted as -o format=srec (write
the output to a file named format=srec).  You don't see this happening
because it's being overridden by another -o argument later on in your
command line.

In general, multicharacter command-line arguments are normally introduced
by double-dashes.  binutils and gcc are somewhat unique in that they have
a few that aren't, which can be a source of confusion.

> is there any other debugging information I can turn on?

There's always --verbose which is handy in nearly any situation.

Good luck!

                            -----Carl

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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