简体   繁体   English

什么是_GLOBAL_OFFSET_TABLE?

[英]What is _GLOBAL_OFFSET_TABLE?

Using the nm command in Linux to see the symbols in my program, I see a symbol by the name _GLOBAL_OFFSET_TABLE_ as shown below.使用 Linux 中的nm命令查看我的程序中的符号,我看到一个名为_GLOBAL_OFFSET_TABLE_的符号,如下所示。 Can somebody elaborate what is _GLOBAL_OFFSET_TABLE_ used for?有人可以详细说明_GLOBAL_OFFSET_TABLE_的用途吗?

0000000000614018 d _GLOBAL_OFFSET_TABLE_

_GLOBAL_OFFSET_TABLE_ is used to locate the real addresses of globals (functions, variables etc) for PIC (Position-Independent Code) , its commonly referred to as the GOT, you can read up on it here and a more in-depth one here . _GLOBAL_OFFSET_TABLE_用于定位PIC (Position-Independent Code)的全局变量(函数、变量等)的真实地址,它通常被称为 GOT,您可以在此处阅读并在此处进行更深入的了解。

Blockquote its commonly referred to as the GOT, you can read up on it here link update Blockquote 它通常被称为 GOT,你可以在这里阅读链接更新

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM