Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 05-17-2005, 03:30 PM   #1
LQ Newbie
Registered: Feb 2005
Location: Beijing
Posts: 9

Rep: Reputation: 0
what do all those __attribute__(()) mean?

I have been looking into the document of gcc, and did not find any thing of using __attribute__ as follows


i actually find those above when i read kernel source code. And i just can not figure them out with gcc manual.

what are the meanings ?

or it is kind of usage of __attribute__ with any word that just to keep a note or what?

thank you first
Old 05-17-2005, 03:52 PM   #2
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,991

Rep: Reputation: 76
I found this on Google:

This looks like it's for defining weakly-defined symbols, where an unresolved symbol gets set to NULL rather than causing the program to abort with an error.
Old 05-17-2005, 04:06 PM   #3
Registered: Apr 2004
Location: Oxford, UK
Distribution: Ubuntu, Debian, various
Posts: 230
Blog Entries: 5

Rep: Reputation: 33
As you say - those particular attributes don't show up in the GCC docs nor in any obvious Google search.

If I were you I would mail the listed maintainer of the kernel code you are looking at directly and see if they can shed some light.

Old 05-17-2005, 04:09 PM   #4
LQ Newbie
Registered: Feb 2005
Location: Beijing
Posts: 9

Original Poster
Rep: Reputation: 0
weak is an __attribute__ of functions. i found it in manual.
what I did not found find is combination with

bitwise, safe and force.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
What's this: __attribute__((packed)) frankli Programming 19 09-14-2012 12:08 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:39 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration