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]

Re: ld -o behaviour


Hi Ben,

: ld behaves inconsistently with its `-o' option.  If I run:
: 
: 	ld foo.o -o foo.x  or
: 	ld foo.o -ofoo.x
: 
: I get the same results.  If I run:
: 
: 	ld foo.o -omagic
: 
: ld names the output file `a.out' (as if no -o option was given at all).
: Could it be that ld accepts -omagic is if it were --omagic?

Yup.  From the linker documentation:

   For options whose names are multiple letters, either one
   dash or two can precede the option name; for example,
   -oformat and --oformat are equivalent.

So the linker is being consistent, just a little unintuitive is all.

Cheers
	Nick

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