简体   繁体   中英

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

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 .

Blockquote its commonly referred to as the GOT, you can read up on it here link update

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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