随笔分类 - C语言
C语言
摘要:gcc __attribute__ 关键字用来给 函数、变量、数据类型设置 属性 alias 用于设置一个函数 设置一个别名 示例 int __func() { printf("in __func ++\n"); return 0; } int fun() __attribute__((alias(
阅读全文
摘要:主页 http://savannah.nongnu.org/projects/lwip/ 下载地址 http://git.savannah.nongnu.org/cgit/lwip.git 下载: git clone git://git.savannah.nongnu.org/lwip.git 使用
阅读全文
摘要:从glibc 源码中学习到的,库函数接口的 版本控制。主要使用soname和 version-script 两个知识点 相关源码: https://github.com/zhiwei122126/zzwlib 目标:假设我们创建一个 名称为 zzw 的库。 1、它的大版本号为 1 2、只导出我们想要
阅读全文
摘要:上一篇 https://www.cnblogs.com/zhangzhiwei122/p/15811422.html 讲到,应用程序进入用户层的第一条指令是其 interpreter 的 入口指令。 这儿 https://www.cnblogs.com/zhangzhiwei122/p/158154
阅读全文
摘要:参考 编译glibc,以期源码调试 https://www.cnblogs.com/zq10/p/14314952.html make manpage https://linux.die.net/man/1/make 1 下载glibc 见 https://www.cnblogs.com/zhang
阅读全文
摘要:1 ubuntu 获取源码-下载glibc 1.1 packages.ubuntu.com 网页搜索 https://packages.ubuntu.com/source/focal/glibc 1.2 apt 下载 参考 https://blog.csdn.net/yuanlu837/articl
阅读全文
摘要:参考: starti 在第一条指令处停下来 https://www.cnblogs.com/zhangzhiwei122/p/15811300.html 链接与装载 interrupter 解释器 https://blog.csdn.net/u011734326/article/details/10
阅读全文
摘要:run -- Start debugged program. 开始执行程序,如果没有设置断点,不会停下。 start -- Start the debugged program stopping at the beginning of the main procedure. 开始执行程序,在main
阅读全文
摘要:参考 https://en.cppreference.com/w/c/variadic https://en.cppreference.com/w/c/language/variadic 参数可变函数 The declaration of a variadic function uses an el
阅读全文
摘要:[转载]C语言中restrict关键字学习 来自:https://blog.csdn.net/llf021421/article/details/8092602 作者:马中马 简介: restrict是c99标准引入的,它只可以用于限定和约束指针,并表明指针是访问一个数据对象的唯一且初始的方式. 即
阅读全文
摘要:参考:https://en.cppreference.com/w/c/language/storage_duration storage-class specifier 简介 1、 At most one specifier may be used, except that _Thread_loca
阅读全文
摘要:基本表达式 primary expresson primary-expression: generic-selection ( expression ) string-literal constant identifier primary expression 包含 5 中具体实现: identif
阅读全文
摘要:程序是一连串的 函数定义(function-definitions)或声明(declarations) 文法: translation-unit: external-declaration translation-unit external-declaration external-declarat
阅读全文
摘要:linkages of identifiers 标识符的链接 An identifier declared in different scopes or in the same scope more than once can be made to refer to the same object
阅读全文
摘要:来源 https://en.cppreference.com/w/c/language/translation_phases Phase 1 阶段 1 字符映射 The individual bytes of the source code file (which is generally a te
阅读全文
摘要:GCC 编译C代码的相关选项 来自 https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#C-Dialect-Options -ansi 1、等同于 -std=c90.[ C++语言,等同于 -std=c++98 ] 2、定义宏 __ST
阅读全文
摘要:C语言标准 - 从这儿可以得到最新的 http://www.open-std.org/jtc1/sc22/wg14/www/projects ISO publication 版本,需要收费 similar draft 可以直接下载 ISO/IEC 9899 - Revision of the C s
阅读全文
摘要:概述 一门 编程语言,不但包括对应的语法,还包括对应的编译器(或解释器)、对应的标准库(或框架库)和相关工具 对于C语言,我们 使用如下三要素学习它。 语法:C语言标准 编译器(或解释器):gcc 库函数:标准要求的和gcc提供的。 GCC 对C语言标准的的支持情况 https://gcc.gnu.
阅读全文