Comments requested for proposed for ld scripting language extension
Catherine Moore
clm@codesourcery.com
Tue May 3 14:35:00 GMT 2011
On 05/03/2011 04:44 AM, Richard Sandiford wrote:
> Tristan Gingold<gingold@adacore.com> writes:
>> I also think that you could make the design a little bit generic and
>> allow boolean negation. What about something like:
>
> Sounds good, but...
>
>>
>> .text : FLAGS (-SHF_PPC_VLE)
>> {
>> *(.text .text.* .gnu.linkonce.t.*)
>> }>ram
>> .text_vle : FLAGS (+SHF_PPC_VLE)
>> {
>> *(.text .text.* .gnu.linkonce.t.*)
>> }>ram
>
> ...how about using C operators (SHF_PPC_VLE and !SHF_PPC_VLE) instead?
> That'd be more consistent with other script expressions.
>
Thank you all for the comments. I will plan to implement this version
using C operators.
>> Finally I wonder if the flags shouldn't be in the input section part,
>> in order to make this feature even more generic:
>>
>> .text :
>> {
>> *(.text .text.* .gnu.linkonce.t.*) FLAGS (-SHF_PPC_VLE)
>> }>ram
>
> While this might be useful in some cases, I think Catherine's version
> is going to make the usual case easier. FWIW, I agree with Alan that
> it fits nicely with the existing ONLY_IF_* constraints.
>
Catherine
More information about the Binutils
mailing list