This is the mail archive of the binutils@sourceware.org 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: what does AT do in a linker scripts ?


On 13.07.16 16:16, Yubin Ruan wrote:
> Hi,
> I am reading some C code and some linker scripts for `ld`.
> I find something really hard to understand:
> 
>     .text : AT(0x100000) {
>         *(.text .stub .text.* .gnu.linkonce.t.*)
>     }
> 
> I understand what the `.text` and the wild char * do, but what does
> the `AT` after the colon do ?
> Need help.

It specifies the LMA, i.e. the address at which the output section is to
be loaded, e.g. into ROM. (As opposed to the VMA, the address at which
the output section has been linked/located to run.)

> And also, why is there no man page describing the syntax of linker scripts ?

That is annoying, and has been for a very long time, but we need to use
the documentation provided:

# apt-get install binutils-doc
$ info ld

It's described in section: "3.6.8.2 Output Section LMA"

Erik


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