What is _GLOBAL_OFFSET_TABLE?

江枫思渺然 提交于 2019-12-01 14:41:08

问题


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. Can somebody elaborate what is _GLOBAL_OFFSET_TABLE_ used for?

0000000000614018 d _GLOBAL_OFFSET_TABLE_

回答1:


_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 indepth one here.



来源:https://stackoverflow.com/questions/9685699/what-is-global-offset-table

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!