SEGMENT_START and -Ttext-segment

Nick Clifton nick@nickclifton.clara.co.uk
Fri Jun 7 15:11:00 GMT 2013


Hi Ryan,

> Is it the intended behaviour that -Ttext-segment must precede the linker
> script option for it to override the default of SEGMENT_START specified
> in the linker script?

Yes.

> but the docs say it's
> override by the -T option. "If an explicit value has been given for this
> segment (with a command-line `-T' option) that value will be returned;
> otherwise the value will be default. "

A slip up in the documentation.  The entry should really read:

    If an explicit value has already been given for this
    segment (with a command-line `-T' option) then that
    value will be returned otherwise the value will be default.

The point is that SEGMENT_START is evaluated at the point in the command 
line where it is encountered.  (Or if it is in the default linker 
script, then it is evaluated after all of the command line options have 
been processed).

I will update the documentation.

Cheers
   Nick



More information about the Binutils mailing list