From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3000 invoked by alias); 2 Jun 2011 20:22:49 -0000 Received: (qmail 2991 invoked by uid 22791); 2 Jun 2011 20:22:48 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 02 Jun 2011 20:22:34 +0000 Received: from hpaq12.eem.corp.google.com (hpaq12.eem.corp.google.com [172.25.149.12]) by smtp-out.google.com with ESMTP id p52KMXZe015184 for ; Thu, 2 Jun 2011 13:22:33 -0700 Received: from pzk9 (pzk9.prod.google.com [10.243.19.137]) by hpaq12.eem.corp.google.com with ESMTP id p52KMUv5005983 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 2 Jun 2011 13:22:31 -0700 Received: by pzk9 with SMTP id 9so549448pzk.19 for ; Thu, 02 Jun 2011 13:22:30 -0700 (PDT) Received: by 10.142.250.32 with SMTP id x32mr269484wfh.57.1307046150025; Thu, 02 Jun 2011 13:22:30 -0700 (PDT) Received: from coign.google.com ([216.239.45.130]) by mx.google.com with ESMTPS id n1sm822411pbi.47.2011.06.02.13.22.28 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 02 Jun 2011 13:22:29 -0700 (PDT) From: Ian Lance Taylor To: Adam =?utf-8?Q?Panch=C3=A1rtek?= Cc: gcc-help@gcc.gnu.org Subject: Re: help using "__attribute__ ((section " References: <4DE745CA.7000206@elgas.cz> Date: Thu, 02 Jun 2011 20:22:00 -0000 In-Reply-To: <4DE745CA.7000206@elgas.cz> ("Adam =?utf-8?Q?Panch=C3=A1rtek?= =?utf-8?Q?=22's?= message of "Thu, 02 Jun 2011 10:11:54 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg00053.txt.bz2 Adam Panch=C3=A1rtek 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