Re: __exit

Erik Mouw (J.A.K.Mouw@ITS.TUDelft.NL)
Thu, 17 May 2001 20:14:21 +0200


On Sun, Jun 17, 2001 at 04:02:44PM +0530, Anil Kumar wrote:
> what does __exit, __p and other such directives means in the linux source
> code. what is its significance.

The macros __init and __exit are defined in include/linux/init.h:

#define __init __attribute__ ((__section__ (".text.init")))
#define __exit __attribute__ ((unused, __section__(".text.exit")))

And they tell the compiler to put the function in .text.init and
.text.exit sections of the object file.

Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/