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: Question about ld script file behaviour


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


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