This is the mail archive of the
crossgcc@cygnus.com
mailing list for the crossgcc project.
Re: Placing Functions in Data Segment
- To: crossgcc@cygnus.com
- Subject: Re: Placing Functions in Data Segment
- From: querbach@realtime.bc.ca (David Querbach)
- Date: Fri, 4 Jun 1999 09:30:40 -0700 (PDT)
- Reply-To: crossgcc@cygnus.com
> Is there a pragma or some other special keyword, linker
> option, anything at all that would allow me to instruct the compiler to
> place these functions into the data segment.
With gcc, you can do something like the following:
void foo() __attribute__ ((section (".data")));
void foo()
{
}
Check the gcc info page for more details.
Regards,
David Querbach
Real-Time Systems Inc.
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.