This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ppc-eabi: interaction betwen section name attributes and -msdata
- To: Geoff Keating <geoffk at geoffk dot org>
- Subject: Re: ppc-eabi: interaction betwen section name attributes and -msdata
- From: jtc at redback dot com (J.T. Conklin)
- Date: 05 Jul 2001 18:26:54 -0700
- Cc: gcc at gcc dot gnu dot org
- References: <5m66d7aumd.fsf@jtc.redback.com> <jmlmm39eix.fsf@geoffk.org>
- Reply-To: jtc at redback dot com
>>>>> "Geoff" == Geoff Keating <geoffk@geoffk.org> writes:
>> Would it be reasonable for gcc to pay attention to section attributes
>> to solve these problems? I'm thinking along the lines of the small
>> data relocs being used used if:
>>
>> * the size size of the data object is below the threshold and no
>> section attribute was specified.
>> or:
>>
>> * the section attribute was one of the small data sections.
Geoff> I'd rather have an explicit __attribute__((sdata)) and
Geoff> __attribute__((nosdata)), or something.
If I understand correctly, there isn't support for a "no" prefix for
attributes. Thus "sdata" and "nosdata" would be separate attributes,
allowing the ambiguity of __attribute__((sdata, nosdata)). Nothing a
little documentation couldn't solve, but I'm a bit uncomfortable with
it.
Geoff> That way you don't have to parse section names in GCC.
It appears that rs6000_encode_section_info() does exactly that. I'm
not sure how much good it does only there. I was thinking of moving
that bit of code into it's own function, and re-using in the other
functions/macros that compare size against g_switch_value.
--jtc
--
J.T. Conklin
RedBack Networks