From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Edwards To: chris.r.lipchik@att.net Cc: ecos-discuss@sourceware.cygnus.com Subject: Re: [ECOS] allocating code to sections in source code Date: Sat, 27 Jan 2001 14:48:00 -0000 Message-id: <20010127165211.A9119@visi.com> References: <20010127213259.EHSQ25609.mtiwmhc21.worldnet.att.net@webmail.worldnet.att.net> X-SW-Source: 2001-01/msg00447.html On Sat, Jan 27, 2001 at 09:32:58PM +0000, chris.r.lipchik@att.net wrote: > I'm looking for a reference guide on line which would > have the proper syntax for allocating code in a C or > ASM source file to a specific section which can be later > referenced by the linker. Specifially, I'm interested in > the syntax for the gcc. In assembly, use the .section directive: .section foobar In gcc, use the __attribute__(()) mechanism: char myBuffer[512] __attribute__((section("foobar"))); Both of these are explained in the "info" files: $ info gcc $ info gas -- Grant Edwards grante@visi.com