This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: what does AT do in a linker scripts ?
- From: Erik Christiansen <dvalin at internode dot on dot net>
- To: binutils at sourceware dot org
- Date: Wed, 13 Jul 2016 18:49:20 +1000
- Subject: Re: what does AT do in a linker scripts ?
- Authentication-results: sourceware.org; auth=none
- References: <5785F8C4.2040801@gmail.com>
- Reply-to: dvalin at internode dot on dot net
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