This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Placing Functions in Data Segment


> 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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]