This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Omit output section from executable
On Wed, Aug 02, 2006 at 05:29:07PM -0400, Daniel Jacobowitz wrote:
> On Wed, Aug 02, 2006 at 11:20:18PM +0200, Udo A. Steinberg wrote:
> > But how can I achieve the same for C sources? When I write:
> >
> > unsigned foo __attribute__((section (".cpulocal")));
> >
> > I get
> > .cpulocal 00000004 00000000 00000000 00000034 2**2
> > CONTENTS, ALLOC, LOAD, DATA
>
> I don't think you can do this from GCC.
Try this evil hack.
unsigned foo __attribute__((section (".cpulocal,\"aw\",@nobits#")));
The '#' might need to be different for targets that start gas comments
with another character.
--
Alan Modra
IBM OzLabs - Linux Technology Centre