This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: help using "__attribute__ ((section "
- From: Ian Lance Taylor <iant at google dot com>
- To: Adam PanchÃrtek <adam dot panchartek at elgas dot cz>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 02 Jun 2011 13:22:26 -0700
- Subject: Re: help using "__attribute__ ((section "
- References: <4DE745CA.7000206@elgas.cz>
Adam PanchÃrtek <adam.panchartek@elgas.cz> writes:
> I would like to ask about the possibility of writing the following
> code (from the Toshibacompiler) to GCC (actually 4.5.1).
>
> Toshiba:
> #pragma section area tables // Start area
> unsigned char table1[10];
> unsigned char table2[20];
> ...
> unsigned char table9[5];
> #pragma section area //End area
>
> GCC:
> unsigned char table1[10] __attribute__ ((section(".tables")));
> unsigned char table2[20] __attribute__ ((section(".tables")));
> ...
> unsigned char table9[5] __attribute__ ((section(".tables")));
>
> Is it possible to write this define in the GCC like "one block" with
> Start and End of area?
Do you mean: does gcc support #pragma section? No, it does not. Sorry.
Ian