c - ‘mc’ 在单词 'mcmodel=medium' 中意味着什么?

标签 c gcc

问题如标题,是缩写吗? 我尝试在 Google 上搜索,但无法轻松找到答案。

最佳答案

根据GCC docs ,

These ‘-m’ switches are supported in addition to the above on x86-64 processors in 64-bit environments.

因此-m表示特定于机器的选项。然后

-mcmodel=medium

Generate code for the medium model: the program is linked in the lower 2 GB of the address space. Small symbols are also placed there. Symbols with sizes larger than -mlarge-data-threshold are put into large data or BSS sections and can be located above 2GB. Programs can be statically or dynamically linked.

所以cmodel代表“代码模型”,它决定了程序如何链接在一起的最大限制。事实上,“中”足以容纳全局对象大于 2 GB 的程序,按照大多数标准来看,这已经是巨大的了。

关于c - ‘mc’ 在单词 'mcmodel=medium' 中意味着什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20064652/

相关文章:

c++ - 使用 SDL 和 OpenGL 编译 Makefile 错误 : missing separator,

c - 一点一点地读取二进制文件

c - 双百分号 (%%) 在 gcc 内联汇编中有什么作用?

c - C 语言的简单非并发 Web 服务器

c - ioctl() 每次给出不同的大小

c - 无法识别的调试选项 : 1 [enabled by default]

gcc - 如何让 Makefile 自动重建包含修改后的头文件的源文件? (在 C/C++ 中)

Python - Py_Initialize 在编译期间未解析

c - printf 中的尾数值略有偏差

c - C 中的反向函数产生单词然后产生垃圾