This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Question about ld script file behaviour
- From: Alan Modra <amodra at gmail dot com>
- To: Matthew Gretton-Dann <matthew dot gretton-dann at arm dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 17 Sep 2010 21:08:38 +0930
- Subject: Re: Question about ld script file behaviour
- References: <1284721158.14582.16.camel@e102319-lin.cambridge.arm.com>
On Fri, Sep 17, 2010 at 11:59:18AM +0100, Matthew Gretton-Dann wrote:
> The following patch causes the ld-arm/script-type test to fail (target
> any arm*-*-*):
> http://sourceware.org/ml/binutils/2010-08/msg00169.html
>
> The test case defines some symbols in an object and then in a linker
> script causes other symbols to be defined based upon those symbols:
>
> SECTIONS {
> foo_a = bar_a;
> foo_t = bar_t;
> foo_o = bar_o;
> .text : { *(.text) }
> .ARM.attribues 0 : { *(.ARM.attributes) }
> }
[snip]
> Following the above change foo_a, foo_t, and foo_o are now absolute
[snip]
Yes, that was a deliberate change, and the new values look correct to
me. Assignments like the above will keep the original section if you
put them inside one of the output section statements. eg.
SECTIONS {
.text : {
foo_a = bar_a;
foo_t = bar_t;
foo_o = bar_o;
*(.text)
}
.ARM.attribues 0 : { *(.ARM.attributes) }
}
--
Alan Modra
Australia Development Lab, IBM