[bitlug] gcc c extensions - useful attributes

  • From: Turuvanur Pavan-A20404 <pavan.tc@xxxxxxxxxxxx>
  • To: "Bitlug (E-mail)" <bitlug@xxxxxxxxxxxxx>
  • Date: Fri, 3 Sep 2004 11:24:18 +0530


found some really useful gcc attributes, most of which have abundant
usage in critical systems s/w.
Here is a link that lists them.

Also, here is an example of one of its usage:

$KERNEL_SRC_DIR/include/linux/init.h :
#define __init  __attribute__((__section__(".init.text")))
__init is used as a function attribute. Examples are init_module,
which is the starting point (called by insmod) for any device
driver in linux. 
check out what "section" does, in the above mentioned link.

Other related posts:

  • » [bitlug] gcc c extensions - useful attributes