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]

Re: ld switches allowed in linker scripts?


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


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