What is _GLOBAL_OFFSET_TABLE?

前端 未结 1 1749
生来不讨喜
生来不讨喜 2021-01-17 08:25

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

相关标签:
1条回答
  • 2021-01-17 09:06

    _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.

    0 讨论(0)
提交回复
热议问题