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]

ld switches allowed in linker scripts?


Hello.

I'm attempting to feed a linker script to older version of ld ("ld version
cygnus-2.6 (with BFD cygnus-2.6)") and find that it always complains about
any linker switches found in the file.  The doc doesn't say anything
explicitly about switches in the script file, but it does imply that
anything that is valid for the command line is valid in a script.

No doubt I'm doing something dumb, but I don't see how my script can get any
simpler.  I have a single line in my script file "myfile.cmd":

-Ttext 00010000

and this is the ld invocation:

ldppc -X -N -M -Map myfile.map -o myfile -T myfile.cmd obj1.o obj2.o obj3.o

This is the error message:

	ldppc:myfile.cmd:1: syntax error

Huh? This statement is accepted without error on the command line, yet
causes ld to choke when in a script file.

A couple notes:

1. No, I can't use a newer version of ld.  I'm forced to the stone-age
cross-compiler GNU tools distributed by the evil Wind River.

2. Why don't I just put that single statement on the ld command line?
Because I want to put about a dozen linker switches in the script file.  The
linker, though, chokes on all switches in the file, but is ok with section
statements.  Even a single such statement will cause a fatal complaint about
a syntax error.

Can anyone tell me how to have linker switches on the script file?

Please CC me with any replies as I am not subscribed to this list.

Thank you.





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