Re: ELF and processor specific aspects of dynamic linking

Ian Lance Taylor <iant@google.com>
Tue, 23 Mar 2010 07:36:08 -0700

          From comp.compilers

Related articles
ELF and processor specific aspects of dynamic linking ripunjay.tripathi@gmail.com (Ripunjay Tripathi) (2010-03-22)
Re: ELF and processor specific aspects of dynamic linking iant@google.com (Ian Lance Taylor) (2010-03-23)
| List of all articles for this month |

From: Ian Lance Taylor <iant@google.com>
Newsgroups: comp.compilers
Date: Tue, 23 Mar 2010 07:36:08 -0700
Organization: Compilers Central
References: 10-03-075
Keywords: linker
Posted-Date: 23 Mar 2010 23:53:00 EDT

Ripunjay Tripathi <ripunjay.tripathi@gmail.com> writes:


> I am trying to understand the process of dynamic linking, in detail.
> For the purpose, I tried .got section of ELF.
>
> q.1 : I read in ELF Standard 1.2(Appendix) that Global offset table's
> format and interpretation are processor specific. Can some body please
> help me, why we don't have standard for this as well and why it has to
> be processor specific?


The way in which the GOT is used is naturally processor specific,
because it depends upon the instructions which the processor supports.
It's true that the GOT normally mostly contains the addresses of
variables. However, details like the number of reserved entries in
the GOT, where the GOT is located, what symbols are associated with
the GOT, how the GOT and the PLT are associated, are all processor
specific.


It's perhaps worth noting that at least the PPC64 ELF ABI permits data
items to live in the TOC which is in effect part of the GOT. That is,
small variables may live inside the GOT, rather than just having their
address be in the GOT.


> q.2 : Can someone point to a tutorial or some thing, where I can get
> some understanding of operations of a dynamic linker on a live
> process, examining the contents of .got, .got.plt sections etc in each
> step (at least for Intel)?


Not quite what you are asking for, but there are some details at
http://www.airs.com/blog/archives/41 .


Ian



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.