Re: Dumb question...what's GOT?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rick Mann writes:
 > Hi. I've seen a lot of GOT-related questions, and there are .got  
 > sections...what's GOT? It's kinda hard to search for in Google.

A global offset table provides information for address
calculation. Position-independent object files (executable and shared
object files) have this table in their data segment. When the system
creates the memory image for an object file, the table entries are
relocated to reflect the absolute virtual addresses as assigned for an
individual process. Because data segments are private for each
process, the table entries can change?unlike text segments, which
multiple processes share.  Assembly language examples below show the
explicit notation needed for position-independent code.

name@ GOT ( %ebx )

This expression denotes an% e b x-relative reference to the global
offset table entry for the symbol name. The% e b x register contains
the absolute address of the global offset table, as explained below.

name@ GOTOFF ( %ebx )

This expression denotes an% e b x-relative reference to the symbol
name. Again,% e b x holds the global offset table address. Note
this expression references name, not the global offset table entry
for name.

System V Application Binary Interface - Intel386? Architecture
Processor Supplement, Fourth Edition
http://www.caldera.com/developers/devspecs/abi386-4.pdf

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux