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;
}
基本上,静态变量和函数是链接器符号,这些变量或函数对其他模块不可见,除了它本身,这些变量和函数作为可重定位对象模块中的本地符号包含在符号表中
局部变量是局部定义的变量,这意味着它们不是全局变量