This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Questions regarding m68k dynamic/shared code


Ian Lance Taylor <ian@airs.com> writes:

|> > 3) What *does* the code in the .plt seciton actually do?
|> 
|> The Procedure Linkage Table is used to support shared libraries.  When
|> code calls a function which is defined in a shared library, that call
|> goes through the PLT.  The PLT encodes the information required to
|> find the function in the shared library, and calls code in the dynamic
|> linker (ld.so) to locate that function and call it.  Normally the
|> actual lookup only happens the first time; after that, the PLT is
|> changed to jump directly to the appropriate code for all subsequent
|> calls.

On m68k the PLT is doing an indirect jump through the corresponding GOT
entry, and only the GOT entry is adjusted by the dynamic linker.  This
avoids all the complications of self-modifying code.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]