Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linker “与”的区别是什么;“本地链接器符号”&&引用;本地程序变量“;?_Linker_Symbols_Elf - Fatal编程技术网

Linker “与”的区别是什么;“本地链接器符号”&&引用;本地程序变量“;?

Linker “与”的区别是什么;“本地链接器符号”&&引用;本地程序变量“;?,linker,symbols,elf,Linker,Symbols,Elf,我想知道“本地链接器符号”和“本地程序变量”之间的区别 我正在读一本书,书中有: 每一个都是什么意思?任何示例?本地链接器符号仅由模块定义和引用 /* This function has global scope within this file (module). It is represented * by a "local linker symbol", since the linker will need to resolve its address * if it is re

我想知道“本地链接器符号”和“本地程序变量”之间的区别

我正在读一本书,书中有:


每一个都是什么意思?任何示例?

本地链接器符号仅由模块定义和引用

/* This function has global scope within this file (module). It is represented 
 * by a "local linker symbol", since the linker will need to resolve its address 
 * if it is referenced by any other function.
 */
static void some_function()
{
    /* These "local program variables" are of no interest to the linker 
     * since they are not visible outside the current function, so no other 
     * part of the program can possibly reference them.
     */
    int a, b, c;
}
基本上,静态变量和函数是链接器符号,这些变量或函数对其他模块不可见,除了它本身,这些变量和函数作为可重定位对象模块中的本地符号包含在符号表中

局部变量是局部定义的变量,这意味着它们不是全局变量