免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1197 | 回复: 2
打印 上一主题 下一主题

[内核入门] 内核初始化过程中的各种看不懂的c语法 [复制链接]

论坛徽章:
4
丑牛
日期:2014-01-11 15:11:12亥猪
日期:2014-12-15 22:19:092015年辞旧岁徽章
日期:2015-03-03 16:54:152015年亚洲杯之约旦
日期:2015-03-13 19:45:11
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-11-27 10:44 |只看该作者 |倒序浏览
比如__attribute__, section,等等。这些内容是gcc的对c语言提供的扩展吗?很想知道这块可以在哪找到相应的手册。

论坛徽章:
1
15-16赛季CBA联赛之北控
日期:2016-03-15 22:53:29
2 [报告]
发表于 2014-11-27 12:06 |只看该作者
《Using the GNU Compiler Collection (GCC)》
第5章 Extensions to the C Language Family

比如:
section ("section-name")
Normally, the compiler places the code it generates in the text section. Sometimes,
however, you need additional sections, or you need certain particular
functions to appear in special sections. The section attribute specifies that a
function lives in a particular section. For example, the declaration:
extern void foobar (void) __attribute__ ((section ("bar")));

论坛徽章:
9
辰龙
日期:2014-08-18 20:38:42未羊
日期:2014-09-04 08:50:45丑牛
日期:2014-09-06 00:12:55寅虎
日期:2014-12-22 20:50:56摩羯座
日期:2015-01-14 22:28:15巳蛇
日期:2015-01-23 20:39:272015年辞旧岁徽章
日期:2015-03-03 16:54:1515-16赛季CBA联赛之青岛
日期:2016-03-13 23:37:1915-16赛季CBA联赛之深圳
日期:2016-03-29 18:52:38
3 [报告]
发表于 2014-11-27 20:28 |只看该作者
回复 1# 魔鬼的惊叹


    https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP