This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ld switches allowed in linker scripts?
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Steve Snyder <steves at formation dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 5 Mar 2002 14:03:11 +1030
- Subject: Re: ld switches allowed in linker scripts?
- References: <KMEBIOGPEGOACPDOHPEEKEDFCAAA.steves@formation.com>
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