ld switches allowed in linker scripts?
Alan Modra
amodra@bigpond.net.au
Mon Mar 4 19:33:00 GMT 2002
On Mon, Mar 04, 2002 at 05:12:32PM -0500, Steve Snyder wrote:
> simpler. I have a single line in my script file "myfile.cmd":
>
> -Ttext 00010000
>
> 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.
Linker switches can't appear in a linker script. You can in many cases
duplicate a switch action inside a linker script, but the syntax is
quite different. eg. You can set the address of the text section to
0x10000 by using
.text 0x10000 :
{
/* input section statements go here. */
}
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Binutils
mailing list