public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* help using  "__attribute__ ((section "
@ 2011-06-02  8:12 Adam Panchártek
  2011-06-02 20:22 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Panchártek @ 2011-06-02  8:12 UTC (permalink / raw)
  To: gcc-help

Hello,

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?

Best regards
Adam


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: help using  "__attribute__ ((section "
  2011-06-02  8:12 help using "__attribute__ ((section " Adam Panchártek
@ 2011-06-02 20:22 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2011-06-02 20:22 UTC (permalink / raw)
  To: Adam Panchártek; +Cc: gcc-help

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-02 20:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-02  8:12 help using "__attribute__ ((section " Adam Panchártek
2011-06-02 20:22 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).