Placing Functions in Data Segment

David Querbach (querbach@realtime.bc.ca)
Fri, 4 Jun 1999 09:30:40 -0700


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