“本地链接器符号”和“本地链接器符号”之间有什么区别? & “本地程序变量”?

发布于 2024-08-23 12:33:56 字数 247 浏览 3 评论 0原文

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

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

替代文本http://img682.imageshack。 us/img682/9816/symbols.jpg

每个是什么意思?有什么例子吗?

I want to know the difference between "Local Linker Symbols" & "Local Program Variables"?

I'm reading a book which has this:

alt text http://img682.imageshack.us/img682/9816/symbols.jpg

What does each mean? Any examples?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

眼前雾蒙蒙 2024-08-30 12:33:56
/* 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;
}
/* 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;
}
心房的律动 2024-08-30 12:33:56

本地链接器符号由模块专门定义和引用。

基本上静态变量和函数是链接器符号,这些变量或函数对除自身之外的其他模块不可见,并且这些变量和函数作为可重定位目标模块中的本地符号包含在符号表中。

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

Local Linker symbols are defined and referenced exclusively by a module.

Basically static variable and function are linker symbols and those variables or functions are not visible to other module except itself and those variables and functions are included in symbol table as local symbol in relocatable object module.

Local variables are variables defined locally which means they are not global variables.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文